simID_PW: The function that simulates independent/cluster-correlated...

simID_PWR Documentation

The function that simulates independent/cluster-correlated semi-competing risks data under semi-Markov PEM/PEM-MVN models.

Description

The function that simulates independent/cluster-correlated semi-competing risks data under semi-Markov PEM/PEM-MVN models.

Usage

simID_PW(
  id = NULL,
  x1,
  x2,
  x3,
  beta1.true,
  beta2.true,
  beta3.true,
  phi1.true,
  phi2.true,
  phi3.true,
  theta.true,
  SigmaV.true = NULL,
  cens,
  knots_list
)

Arguments

id

A vector of cluster information for n subjects. The cluster membership must be set to consecutive positive integers, 1:J. Required only when generating clustered data.

x1, x2, x3

Covariate matrices with n rows.

beta1.true, beta2.true, beta3.true

Vectors of true regression parameter values. The length of each vector should equal the number of columns in the corresponding covariate matrix.

phi1.true, phi2.true, phi3.true

Vectors of true baseline parameter values.

theta.true

True value for \theta.

SigmaV.true

True value for covariance matrix of MVN cluster-level random effects. Required only when generating clustered data. Should be a numeric J\times J matrix.

cens

A numeric vector of two elements. The right censoring times are generated from Uniform(cens[1], cens[2]).

knots_list

A list containing three numeric vectors, representing the breakpoints of the piecewise specification for each transition hazard (excluding 0).

Value

returns a data.frame containing semi-competing risks outcomes from n subjects. It is of dimension n\times 4: the columns correspond to y_1, \delta_1, y_2, \delta_2.

  • y1a vector of n times to the non-terminal event

  • y2a vector of n times to the terminal event

  • delta1a vector of n censoring indicators for the non-terminal event time (1=event occurred, 0=censored)

  • delta2a vector of n censoring indicators for the terminal event time (1=event occurred, 0=censored)


hreed7/SemiCompRisksPen documentation built on Dec. 15, 2024, 5:41 p.m.