Learn R Programming

MapGAM (version 1.3)

dls: Calculating Derivatives of Partial Likelihood for Cox Proportional Hazard Additive Models

Description

Calculate the log partial likelihood and derivatives with respect to the subject log hazard ratio (compared to the baseline) for Cox proportional hazard additive model described in gamcox. Results are used to update estimates in gamcox function.

Usage

dls(Y,X,which,eta,span=0.5,adjust=TRUE)

Value

deltaeta

difference between the input eta and the new updated eta.

w

inverse of smoothed second derivatives.

l

partial likelihood baed on input eta.

Arguments

Y

a list including two elements: time for survival times and event for censoring statu.

X

a data frame containing the variables in the model. The data must be structured so that the X and Y coordinates for two-dimensional predictor (e.g., geolocation) are in the 1st and 2nd columns, respectively.

which

matrix index for smooth term.

eta

current estimated subject log hazard ratio compared to the baseline.

span

smoothing parameter that been used to smoothing the second derivative of the log partial likelihood.

adjust

adjust=TRUE means there are confounders included in the model.

Author

Lu Bai and Scott Bartell

Send bug reports to sbartell@uci.edu.

Details

For data that having tied failure times, Efron's approximation method is used to calculate the log partial likelihood and correspongding derivatives. Let \(\eta\) denote the log hazard ratio, and l denote the partial likelihood. When fitting a Cox proportional hazard additive model, \(\eta\) is updated by $$ \eta^{new} = \eta^{old} - \frac{dl/d{\eta}}{smooth(d^2l/d\eta^2)} $$

References

Hastie TJ, Tibshirani RJ. Generalized Additive Models. (Chapman & Hall/CRC Monographs on Statistics & Applied Probability, Boca Raton, Florida, 1990).

Bristow RE, Chang J, Ziogas A, Gillen DL, Bai L, Vieira VM. Spatial Analysis of Advanced-stage Ovarian Cancer Mortality in California. American Journal of Obstetrics and Gynecology 2015, 213(1), e1-43).

See Also

gamcox, predict.gamcox.

Examples

Run this code
# \donttest{
data(CAdata)
Y = CAdata[,c("time","event")]
X = CAdata[,c(3:5)]
eta = coxph(Surv(time,event)~AGE,data=CAdata)$linear.predictors
result = dls(Y,X,1:2,eta,span=0.2)
plot(eta,result$deltaeta)
# }

Run the code above in your browser using DataLab