sim.survdata: Simulate Survival Data with Change Point

Description Usage Arguments Value

View source: R/sim.survdata.R

Description

Simulates Weibull distributed survival data from a given data set with change point above which hazard rate is constant.

Usage

1
2
sim.survdata(time, event, changeP, shape, scale, censoring, censpoint,
  times.int, parametric)

Arguments

time

Numeric vector with survival times.

event

Numeric vector indicating censoring status; 0 = alive (censored), 1 = dead (uncensored). If missing, all observations are assumed to be uncensored.

changeP

Change point.

shape

Shape parameter of Weibull distribution.

scale

Scale parameter of Weibull distribution.

censoring

Logical; if TRUE, censored data are generated.

censpoint

Censoring point for Type I censoring.

times.int

Logical; if TRUE, returned survival times are integers.

parametric

Logical; if TRUE, survival times are generated parametrically by inverse transform sampling; otherwise Kaplan-Meier is used for simulation.

Value

A dataset with survival times and corresponding censoring status ('event').


CPsurv documentation built on May 2, 2019, 8:33 a.m.

Related to sim.survdata in CPsurv...