TransModel: Main function for fitting the linear transformation models...

Description Usage Arguments Details Value References Examples

View source: R/TransModel.R

Description

This function is used to fit a linear transformation model, such as the proportional hazards model or proportional odds model, to the right censored survival data.

Usage

1
2
TransModel(formula = formula(data), data = parent.frame(), r, CICB.st, subset, 
dx, iter.max, num.sim)

Arguments

formula

A survival formula based on the Surv() function, containg survival time, right censoring indicator and coavariates.

data

Data set with all the variables needed in formula.

r

Parameter in the hazard function, used to define different linear models. See details for more information.

CICB.st

Whether or not the perturbation for deriving the confidence intervals and confidence bands of survival estimates will be done. The default value is FALSE.

subset

Conditions for subsetting the dataset.

dx

Convergence tolerance. Default is 0.001.

iter.max

Maximum number of iterations before convergence. Default is 100.

num.sim

The number of perturbation, only works when CICB.st=TRUE. Default is 200.

Details

In the linear transformation model H(t)=-b'z+e, the hazard function for error term e is defined as: h(x)=exp(x)/(1+r*exp(x)), where the parameter r must be a non-negative value and can be changed for different models. For example, r=0 refers to the proportional hazards model and r=1 refers to a proportional odds model. The default value for r is 0.

Value

coefficients

Estimated coefficients for covariates in the specified linear transformation model.

vcov

Estimated covariance matix for the coefficients.

converged

Convergence status, 0 indicates converged, and number of iterations used for convergence.

References

Kani Chen, et al., Semiparametric analysis of transformation models with censored data. Biometrika, 89(3), 659-668, 2002.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
beta0 = c(1,-1)
# Fit proportional hazards model
data(PH_examp)
mod1<-TransModel(formula=Surv(time,status)~gender+age,data=PH_examp,r=0)
print(mod1)
summary(mod1)
mod1$coefficients
mod1$vcov
mod1$converged

# Fit proportional odds model
data(PO_examp)
mod2=TransModel(Surv(time,status)~gender+age,data=PO_examp,r=1)
print(mod2)
summary(mod2)

TransModel documentation built on May 29, 2017, 7:24 p.m.