mlm.fit: mlm.fit

Description Usage Arguments Value Examples

Description

estimate coefficient of interest variables with known Svs, mlm.tstat

Usage

1
2
mlm.fit(dat.m = NULL, design = NULL, coef = 2, B = NULL, full = FALSE,
  mcore = 4)

Arguments

dat.m

n x m matrix of methylation microarray

design

design matrix for expression data matrix(data.m)

coef

covariate of interest; Default = 2

B

permutation number of covariates of interest

full

return full regression object; Optional FALSE

Value

list coefficient stdev_unscale sigma df.residule

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sd <- 0.3 * sqrt(4/rchisq(100, df = 4))
y  <- matrix(rnorm(100*6, sd = sd), 100, 6)  # each row of data is generate by sd[i] ~ invchisq
rownames(y) <- paste("cg", 1:100)
# introduce 2 cgs which are DMPs
y[1:2, 4:6] <- y[1:2, 4:6] + 2 # have significant differential when we introduce the poi(cancer - normal)
pheno <- factor(c(0,0,0,1,1,1))
levels(pheno) <- c("normal", "cancer")
design <- model.matrix(~ pheno)
fit <- mlm.fit(y, design)
sig.tab <- mlm.tstat(fit)
library(doMC)
registerDoMC(2)

xinchoubiology/Rcppsva documentation built on May 4, 2019, 1:06 p.m.