\HeaderA{PRIM.real.data.min}{PRIM output from VRCmin data analysis}{PRIM.real.data.min}
\aliasA{best.box.X.ranges}{PRIM.real.data.min}{best.box.X.ranges}
\aliasA{box.idx.list}{PRIM.real.data.min}{box.idx.list}
\aliasA{box.idx.listTD1}{PRIM.real.data.min}{box.idx.listTD1}
\aliasA{box.idx.listTD2}{PRIM.real.data.min}{box.idx.listTD2}
\aliasA{box.support.ES}{PRIM.real.data.min}{box.support.ES}
\aliasA{box.support.PS}{PRIM.real.data.min}{box.support.PS}
\aliasA{means.ES}{PRIM.real.data.min}{means.ES}
\aliasA{means.PS}{PRIM.real.data.min}{means.PS}
\aliasA{out.cv}{PRIM.real.data.min}{out.cv}
\aliasA{out.expand}{PRIM.real.data.min}{out.expand}
\aliasA{out.peel}{PRIM.real.data.min}{out.peel}
\aliasA{Rule1.idx}{PRIM.real.data.min}{Rule1.idx}
\aliasA{TD1}{PRIM.real.data.min}{TD1}
\aliasA{TD2}{PRIM.real.data.min}{TD2}
\aliasA{type.ES}{PRIM.real.data.min}{type.ES}
\aliasA{type.PS}{PRIM.real.data.min}{type.PS}
\keyword{datasets}{PRIM.real.data.min}
\begin{Description}\relax
The HIV-protein stimulated \LinkA{st.1829}{st.1829} FCS R-object and the
unstimulated \LinkA{unst.1829}{unst.1829} FCS R-object from the
\LinkA{VRCmin}{VRCmin} data were used to exemplify the PRIM algorithm on a real
dataset.  The three steps for the finding of a single rule were saved
as output.  The \LinkA{out.peel}{out.peel} is the 'PRIM.step' class object of the
Peeling step.  The \LinkA{out.expand}{out.expand} is the 'PRIM.step' class object
of the Expansion Step.  The \LinkA{out.cv}{out.cv} is the 'PRIM.crossval.step'
class object of the cross-validation step.  From these output objects
we obtain the necessary indices and vectors for making plots that are
exemplified in PRIM.pdf.
\end{Description}
\begin{Usage}
\begin{verbatim}data(PRIM.real.data.min)\end{verbatim}
\end{Usage}
\begin{Format}\relax
\item[box.idx.list] Peeling Step: a list of five boxes that were in
the peeling sequence of 'out.peel' which used the whole data 'X' 

\item[box.support.PS] Peeling Step: The vector of proportions of X
that lie in the peeled box for each iteration of the expansion
step from 'out.peel'

\item[means.PS] Peeling Step: The vector of means(Y) of each peeled
box for each iteration from 'out.peel'

\item[type.PS] Peeling  Step: The vector of peeling types,
denoting the direction and variable for the addition of new points
into the box for each iteration from 'out.peel'

\item[box.support.ES] Expansion Step: The vector of proportions of X
that lie in the expanded box for each iteration of the expansion
step from 'out.expand'

\item[means.ES] Expansion Step: The vector of means(Y) of each expanded
box for each iteration from 'out.expand'

\item[type.ES] Expansion  Step: The vector of expansion types,
denoting the direction and variable for the addition of new points
into the box for each iteration from 'out.expand'

\item[best.box.X.ranges] Expansion Step: The X-variable ranges of the
final rule
estimated after the Expansion Step from 'out.expand'

\item[Rule1.idx] Expansion Step: The index of the final rule obtained
after the expansion step from out.expand

\item[TD1] Cross-Validation Step: vector of positional row
indices corresponding to the first
testdata set which is subset from the original 'X' data
(which is constructed in the example below)

\item[TD2] Cross-Validation Step: vector of positional row
indices corresponding to the second
testdata set which is subset from the original 'X' data
(which is constructed in the example below)

\item[box.idx.listTD1] Cross-Validation Step: a list of five boxes in
the peeling sequence of the first Testdata set

\item[box.idx.listTD2] Cross-Validation Step: a list of five boxes in
the peeling sequence of the second Testdata set
\end{Format}
\begin{Details}\relax
The class information, extraction, plotting, implementation
tools for the 'PRIM.step' and the
'PRIM.crossval.step' class objects are detailed in the
\pkg{rfcprim} package.
\end{Details}
\begin{Source}\relax
See \LinkA{VRCmin}{VRCmin}
\end{Source}
\begin{References}\relax
See \LinkA{VRCmin}{VRCmin} and \pkg{rfcprim}.
\end{References}
\begin{Examples}
\begin{ExampleCode}
data(PRIM.real.data)

## the following code was used to generate the output
if (FALSE){

  data(VRCmin)
  ## the HIV-protein stimulation status
  Y <- c(rep(1, dim.FCS(st.1829)[1]), 
       rep(0, dim.FCS(unst.1829)[1]))

  ## the dataset
  X <- rbind(as(st.1829, "matrix"), as(unst.1829, "matrix"))
  if (require(rfcprim)){
  out.peel <- peel.step(X,
                      Y,
                      min.box.size = 500,
                      alpha=0.10,
                      verbose=TRUE)

  out.expand <- expand.step(X,
                          Y,
                          out.peel@best.box.idx,
                          beta=0.01,
                          verbose=TRUE)

  out.cv <- crossval.step(X,
                        Y,
                        num.testdata=2,
                        prob.testdata=c(0.50, 0.50),
                        alpha=0.10,
                        target.mu.Y=1,
                        min.box.size=500,
                        choose.best.box.decision=c("max.mean.box", "final.box"),
                       
                        beta=0.01,
                        verbose=TRUE)

  box.idx.list <- list(out.peel@best.box.idx,
     out.expand@best.box.idx)

  box.support.PS <- out.peel@box.support.vec

  means.PS <- out.peel@means.vec

  type.PS <- out.peel@type.vec

  box.support.ES <- out.expand@box.support.vec

  means.ES <- out.expand@means.vec

  type.ES <- out.expand@type.vec

  best.box.X.ranges <- out.expand@best.box.X.ranges

  Rule1.idx <- out.expand@best.box.idx

  TD1 <- out.cv[1, "testdata.idx.list"]
  TD2 <- out.cv[2, "testdata.idx.list"]

  box.idx.listTD1 <- list(out.cv[1,"step.set.list"]@peel.step@best.box.idx,
      out.cv[1, "step.set.list"]@expand.step@best.box.idx)

  box.idx.listTD2 <- list(out.cv[2,"step.set.list"]@peel.step@best.box.idx,
      out.cv[2, "step.set.list"]@expand.step@best.box.idx)
  }
 }

\end{ExampleCode}
\end{Examples}

