SimMVN.mxIW {SharedHT2} | R Documentation |
See the SimMVN.IW documentation (type ?SimMVN.IW). SimMVN.mxIW
generates nsim
simulation replicates of a simulated micro-array
expression experiment but this time under a Multivariate Normal/mixed
Inverse Wishart model for the purposes of benchmarking the four previously
(see the documentation for SimMVN.IW) mentioned statistics when the data
doesn't obey the Multivariate Normal/Inverse Wishart model assumptions.
Specifically, the mixed Inverse Wishart is chosen so that the average group
variances under this model are the same as they would be under the
Multivariate Noraml/Inverse Wishart model with the same parameters.
SimMVN.mxIW(nsim, shape = NULL, rate = NULL, theta = NULL, nreps, Ngenes, effect.size, FDRlist = 0.05 * (1:5), f1f2 = c(1/4, 1/2), verbose = F, gradient = F)
nsim |
Number of simulations desired. |
shape |
The shape parameter for the Inverse Wishart distribution the same expected value |
rate |
The rate parameter matrix, of dimension d by d
where d is the number of experimental groups. |
theta |
Alternatively to specifying shape and rate
above, the user can directly specify the model parameters from which
shape and rate are computed. Type ?EBfit for more details. |
nreps |
Number of replicates per group. |
Ngenes |
Number of rows (or genes) in the dataset (micro-array experiment) |
effect.size |
A vector of length Ngenes giving the effect size.
Rows with population mean zero (not differentially expressed) are set to zero
while rows with non-zero population mean (differentially expressed) are set to
some non-zero value. For a feeling of corresponding power in the naive F test
of all means identically zero see the documetation on find.ncp by typing
?find.ncp. |
FDRlist |
A list of FDR values to use in the BH step down procedure used in summarizing the simulation results. |
f1f2 |
A vector of length 2 containing strictly increasing values between
0 and 1. These are additional parameters specifying the mixing proportion for
the discrete two component mixture and the proportion of the fractional part
of shape/(2*d+2) specifying the amount by which one of the two shape
parameters should exceed 1. The other shape parameter is derived so that
the averaged-over-genes group variances are equal to their values under the
corresponding Multivariate Normal/Inverse Wishart model. |
verbose |
Doesn't really belong here. Defaults to FALSE, leave it that way or your log file will grow to large |
gradient |
Also doesn't belong here. Defaults to FALSE, leave it that way. |
A list containing the following 5 components:
fdrtbl |
A matrix of dimension length(FDRlist) by 8, with one row
corresponding to each of the expected FDR's given in FDRlist and having columns
ShHT2-TPR , ShHT2-FPR , HT2-TPR , HT2-FPR ,
ShUT2-TPR , ShUT2-FPR , UT2-TPR , UT2-FPR , each giving
the average empirical true/false positive rate over the nsim simulations
for the corresponding statistic. |
countstbl |
An Ngenes by 8 matrix. Instead of thresh-holding the
corresponding p-values by the BH stepdown criterion, unique values of the
statistic are treated as candidate threshold values giving at each simulation
rep empirical true/false positive rates for each of the 4 statistics. These
values are averaged over the nsim simulation reps producing an Ngenes
by 8 matrix. |
coef |
An nsim by d*(d+1)/2 + 1 matrix containing the fitted
model coefficients for the Multivariate Normal/Inverse Wishart model. |
coefEV |
An nsim by 2 matrix containing the fitted model coefficients
for the Normal/Inverse Gamma model. |
call |
The original call to SimMVN.mxIW |
Grant Izmirlian izmirlian@nih.gov
EB.Anova
, EBfit
, SimAffyDat
,
TopGenes
, SimNorm.IG
, SimMVN.IW
,
SimOneNorm.IG
, SimOneMVN.IW
,
SimOneMVN.mxIW
## Not run: data(SimAffyDat) fit.SimAffyDat <- EB.Anova(data=SimAffyDat, labels=c("log2.grp" H0="zero.means", Var.Struct = "general") SimResults <- SimMVN.mxIW(nsim=500, theta=EBfit(fit.SimAffyDat)$coef, Ngenes=12625, nreps=3, FDRlist = 0.05*(1:5), effect.size = c(rep(4.33, 100), rep(0, 12625 - 100), f1f2 = c(1/4, 1/2))) # Or create a batch file like this # contents of mysim.R: library(SharedHT2) nsim <- 500 nreps <- 3 Ngenes <- 12625 nTP <- 100 effect.size <- c(rep(4.33, nTP), rep(0, Ngenes - nTP) f1f2 <- c(1/4, 1/2) theta <- EBfit(fit.SimAffyDat)$coef SimResults <- Simnu.mix(nsim=nsim, theta = theta, nreps = nreps, Ngenes = Ngenes, effect.size = effect.size, f1f2 = f1f2) # At the command prompt R CMD BATCH mysim.R mysim.Rout # nsim=500, Ngenes=12625, nreps=3, with d=2 groups (implicit in the dimension # of theta) will take just under 3 hours on a pentium 4. ## End(Not run)