Skip to contents

Function for reproducing 'internal' simulation study. See vignette.

Usage

simulate(
  p = 1000,
  n.target = 100,
  n.source = 150,
  k = 2,
  family = "gaussian",
  prop = 0.01,
  rho.beta = 0.95,
  rho.x = 0.95,
  w = 0.5,
  trans = rep(TRUE, times = k),
  exp = rep(1, times = k)
)

Arguments

p

number of features

n.target

sample size for target data set

n.source

sample size(s) for source data set(s), scalar or vector of length k

k

number of source data sets

family

"Gaussian", "binomial" or "poisson"

prop

approximate proportion of features with effects

rho.beta

correlation between effects (across different data sets)

rho.x

base for decreasing correlation structure for correlation between features

w

weight between signal and noise

trans

logical vector of length \(k\): transferable (TRUE) or non-transferable (FALSE) source

exp

non-negative vector of length \(k\) for transforming beta to sign(beta)*abs(beta)^exp

See also

Use [glmtrans::models()] for reproducing 'external' simulation study.