Description Usage Arguments Value Examples
View source: R/simulate_data.R
Simulate data from the graper model with groups of unequal size and pre-specified parameters gamma, pi and tau.
1 2 3 | makeExampleDataWithUnequalGroups(n = 100, pg = c(100, 100, 10, 10),
gammas = c(0.1, 10, 0.1, 10), pis = c(0.5, 0.5, 0.5, 0.5), tau = 1,
rho = 0, response = "gaussian", intercept = 0)
|
n |
number of samples |
pg |
vector of length g (desired number of groups) with number of features per group |
gammas |
vector of length g, specifying the slab precision of the prior on beta per group |
pis |
vector of length g, specifying the probability of s to be 1 (slab) |
tau |
noise precision (only relevant for gaussian response) |
rho |
correlation of design matrix (Toeplitz structure) |
response |
"gaussian" for continuous response from a linear regression model, "bernoulli" for a binary response from a logistic regression model. |
intercept |
model intercept (default: 0) |
list containin the design matrix X
,
the response y
,
the feature annotation to groups annot
as well as
the different parameters in the Bayesian model
and the correlation strength rho
1 | dat <- makeExampleDataWithUnequalGroups()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.