Simnu.mix {SharedHT2} | R Documentation |
See the SimW.IW documentation (type ?SimW.IW). Simmix.nu
generates
nsim
simulation replicates of a simulated micro-array expression
experiment but this time under a Wishart/mixed Inverse Wishart model for
the purposes of benchmarking the four previously (in ?SimW.IW) mentioned
statistics when the data doesn't obey the Wishart/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 Wishart/Inverse Wishart model with the same parameters.
Simnu.mix(nsim, nu = NULL, Lambda = 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. |
nu |
The shape parameter for the Inverse Wishart distribution with equal averaged-over-genes group variance. |
Lambda |
The rate parameter matrix, of dimension d by d
where d is the number of experimental groups. |
theta |
Alternatively to specifying nu and Lambda
above, the user can directly specify the model parameters from which
nu and Lambda 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 nu/(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 Wishart/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 Wishart/Inverse Wishart model. |
coefEV |
An nsim by 2 matrix containing the fitted model coefficients
for the Chi-squared/Inverse Gamma model. |
call |
The original call to Simnu.mix |
Grant Izmirlian izmirlian@nih.gov
EB.Anova
, EBfit
, SimAffyDat
,
TopGenes
, Simnu.mix
## Not run: Simnu.mix(nsim=500, theta=EBfit(fit.SimAffyDat)$coef, Ngenes=12625, nreps=3, FDRlist = 0.05*(1:5)) # 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(7.5/3^{0.5}, nTP), rep(0, Ngenes - nTP) theta <- EBfit(fit.SimAffyDat)$coef SimResults <- Simnu.mix(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)