50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


JMcmprsk (version 0.9.10)

SimDataO: Data simulation of ordinal outcomes and competing risks

Description

Simulation of ordinal longitudinal outcome and competing risks data Currently, only the simulation in Li et al(2010) is implemented.

Usage

SimDataO(
  k_val,
  p1_val,
  p1a_val,
  p2_val,
  g_val,
  truebeta,
  truetheta,
  truegamma,
  randeffect,
  yfn,
  cfn,
  mfn
)

Arguments

k_val

The number of subjects in study.

p1_val

The dimension of fixed effects in longitudinal measurements.

p1a_val

The dimension of random effects in longitudinal measurements.

p2_val

The dimension of fixed effects in competing risks failure time data.

g_val

The number of type of failure in competing risks data.

truebeta

True values for beta, the longitudinal coefficients.

truetheta

True values for theta, subset of the non-proportional odds longitudinal coefficients.

truegamma

True values for gamma, the survival coefficients.

randeffect

True values for random effects in longitudinal and competing risks parts,namely in the order of σb,ν2,σu.

yfn

Filename of genereated Y matrix for longitudinal measurements in long format.

cfn

Filename of genereated C matrix for competing risks failure time data.

mfn

Filename of genereated M vector to indicate the number of longitudinal measurements per subject.

Value

Files with names yfn, cfn and mfn.

censoring_rate Censoring rate of the survival data.
rate1 Censoring rate of competing risk 1.
rate2 Censoring rate of competing risk 2.
yfn Filename of genereated Y matrix for longitudinal measurements.
cfn Filename of genereated C matrix for competing risks failure time data.

References

  • Ning Li,Robert M. Elashoff,Gang Li and Jeffrey Saver. "Joint modeling of longitudinal ordinal data and competing risks survival times and analysis of the NINDS rt-PA stroke trial." Statistics in medicine 29.5 (2010): 546-557.

See Also

SimDataC

Examples

Run this code
# NOT RUN {
# A toy example testint data generations
require(JMcmprsk)
set.seed(123)
yfn=tempfile(pattern = "", fileext = ".txt")
cfn=tempfile(pattern = "", fileext = ".txt")
mfn=tempfile(pattern = "", fileext = ".txt")
 k_val=50;p1_val=3;p1a_val=1; p2_val=2;g_val=2;
truebeta=c(-1,1.5,0.8);truetheta=c(-0.5,1);truegamma=c(0.8,-1,0.5,-1); randeffect=c(1,0.5,0.5);
#writing files
SimDataO(k_val, p1_val, p1a_val, p2_val, g_val,
      truebeta, truetheta, truegamma, randeffect, yfn,  cfn,  mfn)
# }
# NOT RUN {
jmo_0(p=3,s=1, yfn,cfn,mfn,point=10,do.trace = TRUE)
# }

Run the code above in your browser using DataLab