\HeaderA{sagmbSimulateData}{Simulate data and assess vsn's parameter estimation}{sagmbSimulateData}
\aliasA{sagmbAssess}{sagmbSimulateData}{sagmbAssess}
\keyword{datagen}{sagmbSimulateData}
\begin{Description}\relax
Functions to validate and assess the performance of vsn
through simulation of data.
\end{Description}
\begin{Usage}
\begin{verbatim}
sagmbSimulateData(n=8064, d=2, de=0, up=0.5, nrstrata=1)
sagmbAssess(h1, sim)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{n}] Numeric. Number of probes (rows).
\item[\code{d}] Numeric. Number of arrays (columns).
\item[\code{de}] Numeric. Fraction of differentially expressed genes.
\item[\code{up}] Numeric. Fraction of up-regulated genes among the
differentially expressed genes.
\item[\code{nrstrata}] Numeric. Number of probe strata.
\item[\code{h1}] Matrix. Calibrated and transformed data, according, e.g., to
vsn
\item[\code{sim}] List. The output of a previous call to
\code{sagmbSimulateData}, see Value
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Please see the vignette.
\end{Details}
\begin{Value}
For \code{sagmbSimulateData}, a list with four components:
\code{hy}, an \code{n x d} matrix with the true (=simulated)
calibrated, transformed data;
\code{y}, an \code{n x d} matrix with the simulated
uncalibrated raw data - this is intended to be fed into
\code{\LinkA{vsn}{vsn}};
\code{is.de}, a logical vector of length \code{n}, specifying
which probes are simulated to be differentially expressed.
\code{strata}, a factor of length \code{n}.

For \code{sagmbSimulateData}, a number: the root mean squared
difference between true and estimated transformed data.
\end{Value}
\begin{Author}\relax
Wolfgang Huber \url{http://www.ebi.ac.uk/huber}
\end{Author}
\begin{References}\relax
Wolfgang Huber, Anja von Heydebreck, Holger Sueltmann,
Annemarie Poustka, and Martin Vingron (2003)
"Parameter estimation for the calibration and variance stabilization
of microarray data",
Statistical Applications in Genetics and Molecular Biology:
Vol. 2: No. 1, Article 3.
http://www.bepress.com/sagmb/vol2/iss1/art3
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{vsn}{vsn}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  sim <- sagmbSimulateData(nrstrata=4)
  ny  <- vsn(sim$y, strata=sim$strata)
  res <- sagmbAssess(exprs(ny), sim)
  res
\end{ExampleCode}
\end{Examples}


