# TransModel: Main function for fitting the linear transformation models... In TransModel: Fit Linear Transformation Models for Right Censored Data

## 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) ```

### Example output

```Loading required package: survival
Call:
TransModel.default(formula = Surv(time, status) ~ gender + age,
data = PH_examp, r = 0)

Coefficients:
gender        age
0.9610871 -1.0393602

Covariance Matrix:
gender          age
gender  0.010456412 -0.001755734
age    -0.001755734  0.003681565
Call:
TransModel.default(formula = Surv(time, status) ~ gender + age,
data = PH_examp, r = 0)

Estimate    StdErr  z.value   p.value
gender  0.961087  0.102257   9.3988 < 2.2e-16 ***
age    -1.039360  0.060676 -17.1297 < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gender        age
0.9610871 -1.0393602
gender          age
gender  0.010456412 -0.001755734
age    -0.001755734  0.003681565
[1] 0 4
Call:
TransModel.default(formula = Surv(time, status) ~ gender + age,
data = PO_examp, r = 1)

Coefficients:
gender       age
-1.015012  1.093923

Covariance Matrix:
gender          age
gender  0.034101831 -0.001399366
age    -0.001399366  0.009024690
Call:
TransModel.default(formula = Surv(time, status) ~ gender + age,
data = PO_examp, r = 1)

Estimate    StdErr z.value   p.value
gender -1.015012  0.184667 -5.4965 3.875e-08 ***
age     1.093923  0.094998 11.5152 < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
```

TransModel documentation built on May 2, 2019, 6:13 a.m.