expectreg.aft {dirttee} R Documentation

Expectile regression for right censored event times using an auxiliary likelihood

Description

Estimate a set of conditional expectiles or quantiles with semiparametric predictors in accelerated failure time models. For the estimation, the asymmetric loss functions are reformulated into auxiliary likelihoods.

Usage

expectreg.aft(
formula,
data = NULL,
smooth = c("cvgrid", "aic", "bic", "lcurve", "fixed"),
lambda = 1,
expectiles = NA, ci = FALSE)

qureg.aft(
formula,
data = NULL,
smooth = c( "cvgrid", "aic", "bic", "lcurve", "fixed"),
lambda = 1,
quantiles = NA,
ci = FALSE)


Arguments

 formula An R formula object consisting of the response variable, '~' and the sum of all effects that should be taken into consideration. Each semiparametric effect has to be given through the function rb. The response needs to be a call of Surv. data Optional data frame containing the variables used in the model, if the data is not explicitely given in the formula. smooth There are different smoothing algorithms that tune lambda to prevent overfitting. Caution, the currently implemented smoothing algorithms can take a long time. Cross validation is done with a grid search ('cvgrid'). The function can also use a supplied fixed penalty ('fixed'). The numerical minimisation is also possible with AIC or BIC as score ('aic', 'bic'). The L-curve ('lcurve') is a new experimental grid search by Frasso and Eilers. lambda The fixed penalty can be adjusted. Also serves as starting value for the smoothing algorithms. expectiles In default setting, the expectiles (0.01,0.02,0.05,0.1,0.2,0.5,0.8,0.9,0.95,0.98,0.99) are calculated. You may specify your own set of expectiles in a vector. The option may be set to 'density' for the calculation of a dense set of expectiles that enhances the use of cdf.qp and cdf.bundle afterwards. ci Whether a covariance matrix for confidence intervals and a summary is calculated. quantiles Quantiles for which the regression should be performed.

Details

For expectile regression, the LAWS loss function

 S = \sum_{i=1}^{n}{ w_i(p)(y_i - \mu_i(p))^2}

with

 w_i(p) = p 1_{(y_i > \mu_i(p))} + (1-p) 1_{(y_i < \mu_i(p))}

is repackaged into the asymmetric normal distribution. Then, an accelerated failure time model is estimated. This function is based on the 'expectreg' package and uses the same functionality to include semiparametric predictors.

For quantile regression, the loss function is replaced with a likelihood from the asymmetric laplace distribution.

Value

An object of class 'expectreg', which is basically a list consisting of:

 lambda  The final smoothing parameters for all expectiles and for all effects in a list. intercepts  The intercept for each expectile. coefficients A matrix of all the coefficients, for each base element a row and for each expectile a column. values The fitted values for each observation and all expectiles, separately in a list for each effect in the model, sorted in order of ascending covariate values. response Vector of the response variable. covariates List with the values of the covariates. formula The formula object that was given to the function. asymmetries Vector of fitted expectile asymmetries as given by argument expectiles. effects List of characters giving the types of covariates. helper List of additional parameters like neighbourhood structure for spatial effects or \phi for kriging. design Complete design matrix. bases Bases components of each covariate. fitted Fitted values  \hat{y} . covmat Covariance matrix, estimated when ci = TRUE. diag.hatma Diagonal of the hat matrix. Used for model selection criteria. data Original data smooth_orig Unchanged original type of smoothing.

plot, predict, resid, fitted, effects and further convenient methods are available for class 'expectreg'.

Author(s)

Fabian Otto-Sobotka
Carl von Ossietzky University Oldenburg
https://uol.de

expectreg.ipc, expectreg.ls

Examples


data(colcancer)
ex <- c(0.05, 0.2, 0.5, 0.8, 0.95)
c100 <- colcancer[1:100,]
exfit <- expectreg.aft(Surv(logfollowup, death) ~ LNE, data = c100, expectiles = ex, smooth="f")
coef(exfit)

qu1 <- qureg.aft(Surv(logfollowup, death) ~ sex + LNE, data=c100, smooth="fixed")
coef(qu1)



[Package dirttee version 1.0.1 Index]