TABLE OF CONTENTS
simulation/initsetup [ Functions ]
NAME
initsetup --- intial setup for simulation
FUNCTION
Creates parameters for simulation
SYNOPSIS
231 initsetup <- function(timedep, m, Ji, K, Kd, fixzero, alternating = F)
SOURCE
234 { 235 m <- m 236 Ji <- Ji 237 if(is.null(fixzero)) fixzero <- "" 238 # Variance of cluster frailty (rec) 239 if(fixzero != "sigma2hat") sigma2 <- .25 else sigma2 <- 0 240 # Variance of cluster frailty (death) 241 if(fixzero != "sigma2dhat") sigma2d <- .25 else sigma2d <- 0 242 # Additional variance for individual frailty (rec) 243 if(fixzero != "nu2hat") nu2 <- .25 else nu2 <- 0 244 # Additional variance for individual frailty (death) 245 if(fixzero != "nu2dhat") nu2d <- .25 else nu2d <- 0 246 # Covariance 247 if(fixzero != "thetahat") theta <- .125 else theta <- 0 248 beta1d <- 1 # Coefficient for the death process 249 beta1 <- 1 # Coefficient for the recurrent process 250 beta2d <- 1 # Coefficient for the death process 251 beta2 <- 1 # Coefficient for the recurrent process 252 lambda0 <- 10 # Baseline hazard for recurrent events 253 lambda0d <- 10 # Baseline hazard for death 254 lambda0c <- 1 # Baseline hazard for censoring 255 if(alternating) lambda0c <- .25 256 gamweib <- 1.8 # Shape parameter for Weibull distribution (rec) 257 gamweibd <- 1.8 # Shape parameter for Weibull distribution (death) 258 gamweibc <- 1.8 # Shape parameter for Weibull distribution (censoring) 259 Z1mean <- 0 # Mean of the Zij covariate (generation) 260 Z1var <- .5 # Variance of the Zij covariate (for generation) 261 Z2mean <- 0 # Mean of the Zij covariate (generation) 262 Z2var <- .5 # Variance of the Zij covariate (for generation) 263 maxiter.outer <- 200 264 maxiter.inner <- 50 265 thresh.outer <- 1e-3 266 thresh.inner <- 1e-5 267 timedep <- timedep 268 K <- K # Number of breaks in the baseline hazard 269 Kd <- Kd # Number of breaks in the baseline hazard for death 270 params = list(m = m, Ji = Ji, sigma2 = sigma2, sigma2d = sigma2d, 271 nu2 = nu2, nu2d = nu2d, theta = theta, 272 beta1d = beta1d, beta2d = beta2d, beta1 = beta1, beta2 = beta2, 273 lambda0 = lambda0, lambda0d = lambda0d, lambda0c = lambda0c, 274 gamweib = gamweib, gamweibd = gamweibd, gamweibc = gamweibc, 275 Z1mean = Z1mean, Z2mean = Z2mean, Z1var = Z1var, Z2var = Z2var, 276 maxiter.outer = maxiter.outer, maxiter.inner = maxiter.inner, 277 thresh.outer = thresh.outer, thresh.inner = thresh.inner, 278 timedep = timedep, K = K, Kd = Kd) 279 }