gendat {BRACE}R Documentation

simulation data generating function

Description

generating the simulation data to apply in brace

Usage

gendat(nsims, nobs, f, g, b, w1, w2, omegaplus, theta1, theta2, k3)

Arguments

nsims

number of simulation datasets

nobs

number of observations for one dataset

f

parameter for generating unmeasured binary confounder

g

parameter for generating group assignment

b

confounder effect on group assignment

w1

shape parameter in generating survival time for event 1 from weibull distribution

w2

shape parameter in generating survival time for event 2 from weibull distribution

omegaplus

multiplier on the baseline hazard for event 1

theta1

multiplier on the baseline hazard for event 1

theta2

multiplier on the baseline hazard for event 2

k3

multiplier on the baseline hazard for event 2

Value

a matrix of nsims*nobs row, which consists of nsims datasets

Examples

nsims = 1; nobs = 1500
f = 0.5; g = 0.333; b = 8; w1 = w2 = 0.667
theta1 = 0.5; theta2 = 1; omegaplus = 1; k3 = 0.333
sim1 = gendat(nsims,nobs,f,g,b,w1,w2,omegaplus,theta1,theta2,k3)

[Package BRACE version 0.1.0 Index]