genSimDat | R Documentation |
Generate a simulated dataset from a mixture of Bayesian hierarchical models with two covariates: age and sex.
genSimDat(G, n, psi, t_pi, m.age = 50, sd.age = 5, p.female = 0.5)
G |
integer. Number of probes. |
n |
integer. Number of samples. |
psi |
numeric. A vector of model hyper-parameters with elements
|
t_pi |
numeric. A vector of mixture proportions: |
m.age |
numeric. mean age. |
sd.age |
numeric. standard deviation of age. |
p.female |
numeric. proportion of females. |
An ExpressionSet object.
Age will be mean-centered and scaled so that it will have mean zero and variance one.
Yixin Zhang zhyl133@gmail.com, Wei Liu liuwei@mathstat.yorku.ca, Weiliang Qiu weiliang.qiu@sanofi.com
Zhang Y, Liu W, Qiu W. A model-based clustering via mixture of hierarchical models with covariate adjustment for detecting differentially expressed genes from paired design. BMC Bioinformatics 24, 423 (2023)
set.seed(1234567)
true.psi = c(2, 1, 0.8,
0.1, -0.01, -0.1,
2, 1, 0.8,
-0.1, -0.01, -0.1,
2, 1, 0.8,
-0.01, -0.1)
names(true.psi)=c("alpha1", "beta1", "k1",
"eta1.intercept", "eta1.Age", "eta1.Sex",
"alpha2", "beta2", "k2",
"eta2.intercept", "eta2.Age", "eta2.Sex",
"alpha3", "beta3", "k3",
"eta3.Age", "eta3.Sex")
true.pi=c(0.1, 0.1)
names(true.pi)=c("pi.OE", "pi.UE")
par.true=c(true.pi, true.psi)
esDiff = genSimDat(G = 1000,
n = 20,
psi = true.psi,
t_pi = true.pi,
m.age = 0, # scaled age
sd.age = 1, # scaled age
p.female = 0.5)
print(esDiff)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.