makeExampleData {graper}R Documentation

Simulate example data from the graper model

Description

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

Usage

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

dat <- makeExampleData()

[Package graper version 1.8.0 Index]