Learn R Programming

NPCox (version 1.3)

npsimu: Simulation data generation of PH model with time-varying coefficients.

Description

An example of data generation for nonparametric PH model.

Usage

npsimu(n, cenpara = NULL)

Value

a list that contain covariates, observed time and censoring indicator.

Arguments

n

The number of sample size, which can be self-determined.

cenpara

Censoring parameter, which is supposed to be positive, for adjustment of censoring rate.

Details

This is some description of this function.

'npsimu' is designed for PH model with time-varying coefficients, h(t) = h0(t)exp(b(t)'Z), generating the covariates, observed time and censoring indicator.

Examples

Run this code
data = npsimu(200)

Run the code above in your browser using DataLab