sptm (version 2019.11-25)

rstm: Simulate failure time from a semiparametric transformation model

Description

Simulate failure time from a semiparametric transformation model

Usage

rstm(n, family = c("PH", "PO", "P2"), linear.predictors, baseline.hazard = 1)

Arguments

n

integer. Sample size

family

string.

linear.predictors

vector. It can also be a matrix of 1 column, the dimension will be dropped

baseline.hazard

numeric.

Details

Called by sim.fong

Examples

Run this code
# NOT RUN {
n=100
beta= c(log(.5), log(.7), log(1.2)) 
t0=2.9999
init = c(log(0.0373*t0),beta)        
ft=rstm (n, family="PH", runif(n,1,2), baseline.hazard=0.032) 


# }

Run the code above in your browser using DataLab