sim.data.MatchCR: Function to simulate matchced survival data in competing risk...

Description Usage Arguments Value Author(s)

View source: R/DataSimCIF.R

Description

Function to simulate matchced survival data in competing risk setting based on cumulative incidence functions

Usage

1
2
3
sim.data.MatchCR(nca, ncont = 5, cifs = NULL, gammax = c(0.1, -0.2),
  mean.link = "log", bias = FALSE, cens = FALSE, cens.dist = FALSE,
  age.expo = NULL, print.cifs = FALSE)

Arguments

nca

number of exposed individuals

ncont

number of unexposed individuals for each exposed (fixed number; by default ncont=5)

cifs

list argument. Starting CIFs for: 1) 1st cause background risk, 2) 2nd cause background risk, 3) 1st cause excess risk, 4) 2nd cause excess risk. If cifs=NULL default quantities are used.

gammax

coefficients for the excess risk model. Max 2 values to be specified (the first covariate is by default binomial, the second is log normal), Default values: γ_1=0.1, \; γ_2=-0.2. Note: some value might not work.

mean.link

link function for the gee model. The data are simulating accordingly to the link that will be used to estimate the excess cif model. Two values supported "id" or "log".

bias

to simulate data with excess risk factor correlated with age

cens

TRUE when simulating data with uniform censoring time (it's the same for exposed and unexposed in the same cluster to mimic the registry structure)

cens.dist

TRUE when censoring time depends on X1. FALSE if no censoring or independent censoring times

age.expo

NULL if age at entry randomly generated from uniform(0,20). If fix age, specify single number (it can be 0, no delay entry)

print.cifs

if information about the given cifs is needed

Value

The function returns by default a dataset. if print.cifs=TRUE, the function returns a list withe the simulated dataset and a list of the startingc cumulative incidence functions.

Author(s)

Cristina Boschini


cribosch/matchsurv documentation built on Aug. 15, 2019, 11:55 a.m.