dat.sim.reg.comp.risks: Data generation function for competing risks data

View source: R/dataGeneratingFunction.R

dat.sim.reg.comp.risksR Documentation

Data generation function for competing risks data

Description

This function generates competing risk data that can be used in simulation studies.

Usage

dat.sim.reg.comp.risks(
  n,
  par,
  iseed,
  s,
  conf,
  Zbin,
  Wbin,
  type.cov,
  A.upper = 15
)

Arguments

n

The sample size of the generated data set.

par

List of parameter vectors for each component of the transformation model.

iseed

Random seed.

s

The number of competing risks. Note that the given parameter vector could specify the parameters for the model with more than s competing risks, but in this case only the first s sets of parameters will be considered.

conf

Boolean value indicating whether the data set should contain confounding.

Zbin

Indicator whether the confounded variable is binary Zbin = 1 or not Zbin = 0. If conf = FALSE, this variable is ignored.

Wbin

Indicator whether the instrument is binary (Zbin = 1) or not Zbin = 0.

type.cov

Vector of characters "c" and "b", indicating which exogenous covariates should be continuous "c" or binary "b".

A.upper

The upper bound on the support of the administrative censoring distribution. This can be used to control for the amount of administrative censoring in the data. Default is A.upper = 15. A.upper = NULL will return a data set without administrative censoring.

Value

A generated data set


depCensoring documentation built on April 4, 2025, 1:52 a.m.