SimNorm.IG {SharedHT2} | R Documentation |
SimNorm.IG
generates nsim
simulation replicates of a
simulated micro-array expression experiment under the Normal/Inverse
Gamma 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.
SimNorm.IG(nsim, shape = NULL, rate = NULL, theta = NULL, ngroups, nreps, Ngenes, effect.size, FDRlist = 0.05 * (1:5), verbose = F, gradient = F)
nsim |
Number of simulations desired. |
shape |
The shape parameter for the Inverse Gamma distribution |
rate |
The rate parameter for the Inverse Gamma distribution |
theta |
Alternatively to specifying shape and rate
above, the user can directly specify the model parameters i.e. the
logged shape and logged rate. |
ngroups |
The number or experimental groups. |
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. |
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 SimNorm.IG |
Grant Izmirlian izmirlian@nih.gov
EB.Anova
, EBfit
, SimAffyDat
,
TopGenes
, SimMVN.IW
,
SimMVN.mxIW
, SimOneNorm.IG
,
SimOneMVN.IW
, SimOneMVN.mxIW
SimResults <- SimNorm.IG(nsim=10, theta=c(0.6605673, -3.2137414), Ngenes=12625, ngroups=2, nreps=3, FDRlist = 0.05*(1:5), effect.size = c(rep(4.33, 100), rep(0, 12625 - 100))) ## Not run: SimResults <- SimNorm.IG(nsim=500, theta=c(0.6605673, -3.2137414), Ngenes=12625, ngroups=2, 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 ngroups <- 2 nreps <- 3 Ngenes <- 12625 nTP <- 100 effect.size <- c(rep(4.33, nTP), rep(0, Ngenes - nTP) theta <- c(0.6605673, -3.2137414) SimResults <- SimNorm.IG(nsim=nsim, theta = theta, ngroups=ngroups, 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)