simMEGH: Function to simulate times to event from a model with MEGH...

View source: R/routines.R

simMEGHR Documentation

Function to simulate times to event from a model with MEGH structure.

Description

Function to simulate times to event from a model with MEGH structure.

Usage

simMEGH(
  seed,
  des = NULL,
  des_t = NULL,
  ID,
  alpha,
  beta,
  theta,
  Sigma,
  cens,
  restr,
  distr
)

Arguments

seed

: seed for simulation

des

: Design matrix for hazard level effects

des_t

: Design matrix for time-dependent effects

ID

: Individual identifiers

beta

: regression parameters multiplying the hazard

theta

: parameters of the baseline hazard

Sigma

: Standard deviation of the random effects or covariance matrix

cens

: Censoring times

restr

: random effects structure ("I", "II", "GENERAL")

distr

: baseline hazard distribution ("LN", "LL", "PGW" or "gamma")

n

: sample size

Value

a list containing the survival times, vital status, and ID


FJRubio67/MEGH documentation built on Jan. 29, 2024, 11:30 a.m.