sptm (version 2019.11-25)

stm: Fit a semiparametric transformation model

Description

Fit a semiparametric transformation model

Usage

stm (formula, dat, strata.formula, phase2.ind=NULL, imputation.formula=NULL, 
    family=c("PH","PO","P2"), ee=c("fine2","fine1","kong"), var.est.type=c("1","2"),
    t0, init=NULL, maxit=1000,
    intermediate=FALSE, verbose=FALSE, show.time.elapsed=TRUE)

# S3 method for stm getFixedEf (object, ...)

Arguments

formula

formula. Regression model of interest

dat

data frame.

strata.formula

formula.

phase2.ind

Boolean vector. If TRUE, phase II samples; if FALSE, phase I samples. If NULL, will try to infer from which subjects have phase II variables. Should not be 0/1

imputation.formula

formula. If not NULL, calibration weighting is done

family

string.

ee

string. Type of design matrix used in estimating equation

var.est.type

string. 1: one-stage estimator, 2: two-stage estimator

t0

numeric. Should be close to the end of study time

init

numerical vector.

maxit

integer. Maximum number of iterations in the optimization process

intermediate

Boolean.

verbose

Boolean.

show.time.elapsed

Boolean.

object

an object of type stm

...

additional arguments

Value

An object of type stm

Details

Fit stm both with and without calibration. Calls stm.internal.

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)        
dat = sim.fong(n, family="PH", beta, random.censoring="0", design="CC", auxiliary="weak", seed=1)

est = stm(formula=Surv(X,d) ~ z + s + z:s, dat, strata.formula=~d, family="PH", t0=t0, init=init,
    var.est.type="1", verbose=3)

# }

Run the code above in your browser using DataCamp Workspace