simu.sample.est: Simulate a sample of control to estimate sd

Description Usage Arguments Details Value Author(s) Examples

Description

Simulate a sample of control to estimate sd

Usage

1
simu.sample.est(sd.null, sd.alt, cov.null, ngenes.null.dep, cov.alt, ngenes.alt.dep, n.est)

Arguments

sd.null

sd vector for observations that are independent and come from Ho

sd.alt

sd vector for observations that are independent and come from Ha

cov.null

list of covariance matrices for observations that are dependent and come from Ho

ngenes.null.dep

number of observations in dependent groups for observations coming from Ho

cov.alt

list of covariance matrices for observations that are dependent and come from Ha

ngenes.alt.dep

number of observations in dependent groups for observations coming from Ha

n.est

number of replicates (columns) to simulate

Details

only simulate observations from control group to estimate sd

Value

returns a matrix of data with each row for a observation and columns are replicates, observations from Ho group occupy first rows followed by observations from Ha

Author(s)

Peng Liu peng_liu@groton.pfizer.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(MASS)
sd.null <- rep(0.1,4); sd.alt <- rep(0.2,5);
cov.null <- cov.alt <- list(2)
cov.null[[1]] <- cov.alt[[1]] <- cbind(c(0.1, 0.05), c(0.05,0.2));
cov.null[[2]] <- cbind(c(0.15, 0.05), c(0.05,0.2));
cov.alt[[2]] <- cbind(c(0.039, -0.037, 0.018), c(-0.037, 0.045, -0.021),
	 c(0.018, -0.021, 0.013));

test <- simu.sample.est(sd.null, sd.alt, cov.null, ngenes.null.dep = 4,
	 cov.alt, ngenes.alt.dep=5, n.est =15)
# dim(test) should be [18,15]

warnes/exp.ssize documentation built on May 4, 2019, 12:59 a.m.