SimMVN.IW {SharedHT2}R Documentation

Simulation study using the Multivariate Normal/Inverse Wishart Model

Description

SimMVN.IW generates nsim simulation replicates of a simulated micro-array expression experiment under the Multivariate Normal/ Inverse Wishart model for the purposes of benchmarking the empirical Bayes Hotelling T-squared test against three other statistics, the standard Hotelling T-squared test, the empirical Bayes univariate F test and the standard univariate F test.

Usage

SimMVN.IW(nsim, shape = NULL, rate = NULL, theta = NULL, nreps, 
          Ngenes, effect.size, FDRlist = 0.05 * (1:5), verbose = F, 
          gradient = F) 

Arguments

nsim Number of simulations desired.
shape The shape parameter for the Inverse Wishart distribution
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.
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.

Value

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.IW

Author(s)

Grant Izmirlian izmirlian@nih.gov

See Also

EB.Anova, EBfit, SimAffyDat, TopGenes, SimNorm.IG, SimMVN.mxIW, SimOneNorm.IG, SimOneMVN.IW, SimOneMVN.mxIW

Examples

## Not run: 
  data(SimAffyDat)
  fit.SimAffyDat <- EB.Anova(data=SimAffyDat, labels=c("log2.grp" 
                             H0="zero.means", Var.Struct = "general")

  SimResults <- 
    SimMVN.IW(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)))
          
# 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)
  theta <- EBfit(fit.SimAffyDat)$coef

  SimResults <- SimMVN.IW(nsim=nsim, theta = theta, nreps = nreps, 
                          Ngenes = Ngenes, effect.size = effect.size)

# 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)

[Package SharedHT2 version 2.0 Index]