Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

QTECox

Function to obtain QTE from a Cox model


Description

Computes quantile treatment effects comparable to those of crq model from a coxph object.

Usage

QTECox(x, smooth = TRUE)

Arguments

x

An object of class coxph produced by coxph.

smooth

Logical indicator if TRUE (default) then Cox survival function is smoothed.

Details

Estimates of the Cox QTE, (d/dx_j) Q( t | x ) at x=xbar, can be expressed as a function of t as follows:

(d/dx_j) Q( t | x ) = (d/dx_j)t * (d/dt) Q(t | x)

The Cox survival function, S( y | x ) = exp{ - H_o(y) exp(b'x) }

(d/dx_j) S( y | x ) = S( y | x ) log(S( y | x )) b_j

where (d/dt) Q(t | x) can be estimated by - (diff(t)/diff(S) (1-t) where $S$ and $t$ denote the surv and time components of the survfit object. Note that since t = 1 - S( y | x ), the above is the value corresponding to the argument $(1-t)$; and furthermore

(d/dx_j)t = - (d/dx_j) S( y | x ) = - (1-t) log(1-t) b_j

Thus the QTE at the mean of x's is:

(1 - S) = (diff(t)/diff(S) S log(S) b_j

Since diff(S) is negative and $log (S)$ is also negative this has the same sign as b_{j} The crq model fits the usual AFT form Surv(log(Time),Status), then

(d/dx_j) log(Q( t | x )) = (d/dx_j) Q( t | x ) / Q( t | x )

This is the matrix form returned.

Value

taus

points of evaluation of the QTE.

QTE

matrix of QTEs, the ith column contains the QTE for the ith covariate effect. Note that there is no intercept effect. see plot.summary.crqs for usage.

Author(s)

Roger Koenker Stephen Portnoy & Tereza Neocleous

References

Koenker, R. and Geling, O. (2001). Reappraising Medfly longevity: a quantile regression survival analysis, J. Amer. Statist. Assoc., 96, 458-468

See Also


quantreg

Quantile Regression

v5.85
GPL (>= 2)
Authors
Roger Koenker [cre, aut], Stephen Portnoy [ctb] (Contributions to Censored QR code), Pin Tian Ng [ctb] (Contributions to Sparse QR code), Blaise Melly [ctb] (Contributions to preprocessing code), Achim Zeileis [ctb] (Contributions to dynrq code essentially identical to his dynlm code), Philip Grosjean [ctb] (Contributions to nlrq code), Cleve Moler [ctb] (author of several linpack routines), Yousef Saad [ctb] (author of sparskit2), Victor Chernozhukov [ctb] (contributions to extreme value inference code), Ivan Fernandez-Val [ctb] (contributions to extreme value inference code), Brian D Ripley [trl, ctb] (Initial (2001) R port from S (to my everlasting shame -- how could I have been so slow to adopt R!) and for numerous other suggestions and useful advice)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.