Learn R Programming

ROCSI (version 0.1.0)

data.gen: data.gen

Description

Function for simulated data generation

Usage

data.gen(
  n,
  k,
  prevalence = sqrt(0.5),
  prog.eff = 1,
  sig2,
  y.sig2,
  rho,
  rhos.bt.real,
  a.constent
)

Value

A list of simulated clinical trial data with heterogeneous prognostic and predictive biomarkers

Arguments

n

Total sample size

k

Number of markers

prevalence

prevalence of predictive biomarkers with values above the cutoff

prog.eff

effect size \(beta\) for prognostic biomarker

sig2

standard deviation of each marker

y.sig2

Standard Deviation of the error term in the linear component

rho

rho*sig2 is the entries for covariance matrix between pairs of different k markers

rhos.bt.real

correlation between each prognostic and predictive markers

a.constent

a constant is set such that there is no overall treatment effect

Details

Function for simulated data generation

Examples

Run this code
n <- 500
k <- 10
prevalence <- sqrt(0.5)
rho<-0.2
sig2 <- 2
rhos.bt.real <- c(0, rep(0.1, (k-3)))*sig2
y.sig2 <- 1
prog.eff <- 0.5
effect.size <- 1
a.constent <- effect.size/(2*(1-prevalence))
ObsData <- data.gen(n=n, k=k, prevalence=prevalence, prog.eff=prog.eff,
                    sig2=sig2, y.sig2=y.sig2, rho=rho,
                    rhos.bt.real=rhos.bt.real, a.constent=a.constent)

Run the code above in your browser using DataLab