makeExampleData: Simulate example data from the graper model

Description Usage Arguments Value Examples

View source: R/simulate_data.R

Description

Simulate data from the graper model with groups of equal size and pre-specified parameters gamma, pi and tau.

Usage

1
2
3
makeExampleData(n = 100, p = 200, g = 4, gammas = c(0.1, 1, 10,
  100), pis = c(0.5, 0.5, 0.5, 0.5), tau = 1, rho = 0,
  response = "gaussian", intercept = 0)

Arguments

n

number of samples

p

number of features

g

number of groups

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

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)

Value

list containing 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

Examples

1
dat <- makeExampleData()

graper documentation built on Nov. 8, 2020, 5:45 p.m.