Title: | Non-Linear Transformation Models |
---|---|
Description: | Fits a non-linear transformation model ('nltm') for analyzing survival data, see Tsodikov (2003) <doi:10.1111/1467-9868.00414>. The class of 'nltm' includes the following currently supported models: Cox proportional hazard, proportional hazard cure, proportional odds, proportional hazard - proportional hazard cure, proportional hazard - proportional odds cure, Gamma frailty, and proportional hazard - proportional odds. |
Authors: | Gilda Garibotti, Alexander Tsodikov, Mark Clements |
Maintainer: | Mark Clements <[email protected]> |
License: | GPL-2 |
Version: | 1.4.4 |
Built: | 2024-11-06 04:26:22 UTC |
Source: | https://github.com/mclements/nltm |
If a single model is specified, gives a sequential analysis of deviance table for that fit.
Each row of the table represents a model, the first corresponds to the NULL model and the following rows correspond to models in which variables have been added sequentially. If a model has both, long term and short term covariates, long term covariates are added first. The last row corresponds to the input model (object).
Each row of the table gives the likelihood ratio test for comparing the model corresponding to that row and the one without the indicated covariate (Deviance) and its degrees of freedom (Df). It also gives -2 times the loglikelihood for the model (Resid. Dev) and its degrees of freedom (Resid. Df). Optionally it gives the p-value for the likelihood ratio test.
If more than one object is specified, the table has a row for each model. It specifies -2 times the loglikelihood for the model (Resid. Dev) and its degrees of freedom (Resid. Df). It also gives the likelihood ratio test for comparing the model corresponding to the given row with that of the previous row. (This only makes statistical sense if the models are nested.) Optionally it gives the p-value for the likelihood ratio test.
## S3 method for class 'nltm' anova(object, ..., test=FALSE)
## S3 method for class 'nltm' anova(object, ..., test=FALSE)
object |
An object of class |
... |
Further |
test |
If TRUE the p-value for the likelihood ratio test is computed. Default is FALSE. |
An object of class "anova"
inheriting from class
"data.frame"
with the information given in the description.
The comparison between two or more models by anova
will only be
valid if they are fitted to the same dataset. This may be a problem if
there are missing values.
nltm
, anova
.
data(melanoma, package="nltm") fit1 <- nltm(formula1=Surv(time,status) ~ size + stage, formula2=Surv(time,status) ~ size, data=melanoma, nlt.model="PH") anova(fit1) anova(fit1,test=TRUE) fit2 <- nltm(formula1=Surv(time,status) ~ size + stage + age, formula2=Surv(time,status) ~ size + age, data=melanoma, nlt.model="PH") anova(fit1,fit2,test=TRUE)
data(melanoma, package="nltm") fit1 <- nltm(formula1=Surv(time,status) ~ size + stage, formula2=Surv(time,status) ~ size, data=melanoma, nlt.model="PH") anova(fit1) anova(fit1,test=TRUE) fit2 <- nltm(formula1=Surv(time,status) ~ size + stage + age, formula2=Surv(time,status) ~ size + age, data=melanoma, nlt.model="PH") anova(fit1,fit2,test=TRUE)
Simulated melanoma survival data.
data(melanoma)
data(melanoma)
time: | survival or censoring time (years) |
status: | censoring status (0=censored, 1=death) |
size: | tumor size (cm) |
stage: | melanoma stage (factor) |
age: | patient age (factor) |
Fits a non-linear transformation model (nltm) for analyzing survival data, see Tsodikov (2003). The class of nltm includes the following currently supported models: Cox proportional hazard, proportional hazard cure, proportional odds, proportional hazard - proportional hazard cure, proportional hazard - proportional odds cure, Gamma frailty, and proportional hazard - proportional odds.
nltm(formula1=formula(data), formula2=formula(data), data=parent.frame(), subset, na.action, init=NULL, control, nlt.model=c("PH","PHC","PO","PHPHC","PHPOC","GFM","PHPO"), model=FALSE, x=FALSE, y=FALSE, verbose=FALSE, ...)
nltm(formula1=formula(data), formula2=formula(data), data=parent.frame(), subset, na.action, init=NULL, control, nlt.model=c("PH","PHC","PO","PHPHC","PHPOC","GFM","PHPO"), model=FALSE, x=FALSE, y=FALSE, verbose=FALSE, ...)
formula1 |
A formula object with the response on the left of a |
formula2 |
A formula corresponding to the short term effect. Will be ignored in models with only one predictor. If not present in models with two predictors, then formula1 will be used both for the long and short term effect. |
data |
A data.frame in which to interpret the variables named in
|
subset |
Expression saying that only a subset of the rows of the data should be used in the fit. |
na.action |
A missing-data filter function, applied to the model.frame, after
any subset argument has been used. Default is
|
init |
Vector of initial values for the calculation of the maximum likelihood estimator of the regression parameters. Default is zero. |
control |
Object specifying iteration limit and other control options. Default
is |
nlt.model |
A character string specifying a non-linear transformation model. Default is Proportional Hazards Model. The conditional survival function
|
model |
If TRUE the model frame is stored. Default is FALSE. |
x |
If TRUE the model matrix is stored. Default is FALSE. |
y |
If TRUE the response matrix is stored. Default is FALSE. |
verbose |
If a file name is given, it stores information from maximization of likelihood and calculation of information matrix in a file. Otherwise, verbose=FALSE. Default is FALSE. |
... |
Other arguments. |
An object of class "nltm"
. See nltm.object
for
details.
Gilda Garibotti ([email protected]) and Alexander Tsodikov.
Tsodikov A. (2003) "Semiparametric models: a generalized self-consistency approach". Journal of the Royal Statistical Society B, 65, Part 3, 759-774.
Tsodikov A. (2002) "Semi-parametric models of long- and short-term survival: an application to the analysis of breast cancer survival in Utah by age and stage". Statistics in Medicine, 21, 895-920.
Tsodikov A., Garibotti G. (2006) "Profile information matrix for nonlinear transformation models". to appear in Journal of Lifetime Data Analysis.
Tsodikov A., Ibrahim J., Yakovlev A. (2003) "Estimating cure rates from survival data: an alternative to two-component mixture models". Journal of the American Statistical Association, Vol. 98, No. 464, 1063-1078.
Wendland M., Tsodikov A., Glenn M., Gaffney D. (2004) "Time interval to the development of breast carcinoma after treatment for Hodgkin disease". Cancer Vol. 101, No. 6, 1275-1282.
nltm.object
, summary.nltm
,
nltm.control
# fit a Proportional Odds Model data(melanoma, package="nltm") fit <- nltm(Surv(time,status) ~ size + age, data=melanoma, nlt.model="PO") summary(fit)
# fit a Proportional Odds Model data(melanoma, package="nltm") fit <- nltm(Surv(time,status) ~ size + age, data=melanoma, nlt.model="PO") summary(fit)
Sets default values for arguments related to calculation of the
maximum profile likelihood estimator of the regression parameters,
(and
, and
), and
the baseline hazard
(see
nltm
). Optimization is performed using the "L-BFGS-B"
method by Byrd et. al. (1995). See optim
.
nltm.control(fnscale=-1, maxit=1000, reltol, factr=1e7, pgtol=0, s0.tol=1e-5, bscale=5)
nltm.control(fnscale=-1, maxit=1000, reltol, factr=1e7, pgtol=0, s0.tol=1e-5, bscale=5)
fnscale |
An overall scaling to be applied to the profile likelihood function (profileLik) during optimization. If positive, turns the problem into a minimization problem. Optimization is performed on 'profileLik(par)/fnscale'. Default is -1. |
maxit |
The maximum number of iterations. Default is 1000. |
reltol |
Relative convergence tolerance. The algorithm stops if it is unable to reduce the value by a factor of 'reltol * (abs(val) + reltol)' at a step. Default is sqrt(.Machine\$double.eps), typically about 1e-8. |
factr |
Controls the convergence of the "L-BFGS-B" method. Convergence occurs when the reduction in the objective is within this factor of the machine tolerance. Default is 1e7, that is a tolerance of about 1e-8. |
pgtol |
Helps control the convergence of the "L-BFGS-B" method. It is a tolerance on the projected gradient in the current search direction. Default is 0. |
s0.tol |
Convergence tolerance of baseline hazard self-consistency equation. Default is 1e-5. |
bscale |
The maximum profile likelihood estimator is obtained by maximizing the profile likelihood over a region determined by the magnitude of the observed covariates. These constraints are imposed in order to avoid numerical problems in the calculation of the profile likelihood function. For a given regression parameter, corresponding to a covariate with observed values x, the upper bound is the bscale of the parameter divided by max(abs(x)) if max(abs(x))>1e-10, otherwise 1e-10. The lower bound is minus the upper bound. Different values of bscale are allowed for different parameters. If
different values of bscale are provided, the vector needs to have the
scale for the regression parameters of the long-term predictor,
Default is 5. |
A list with the same elements as the input.
Byrd, R. H., Lu, P., Nocedal, J. and Zhu, C. (1995) A limited memory algorithm for bound constrained optimization. SIAM J. Scientific Computing, 16, 1190-1208.
optim
, nltm
.
This object is returned by the nltm
function. It represents a
fitted non-linear transformation model.
Objects of this class have methods for the functions print
and
summary
.
Components of a nltm
object.
The maximum profile likelihood estimators of the model regression
parameters, (and
and
). See
nltm
.
A vector of length 2 containing the log-likelihood of the null model and with the final values of the coefficients.
MLE of the baseline survival function at the profile maximum likelihood parameters. It is obtained from the hazard jumps that satisfy self-consistency equation (5) in Tsodikov A. and Garibotti G. (2006).
The variance matrix of the coefficients.
The number of observations used in the fit.
The maximum number of iterations of the optimization procedure. Default is 1000.
Number of calls to the profile likelihood function during the optimization process. This excludes those calls needed to compute a finite-difference approximation to the gradient.
An integer code. '0' indicates successful convergence. Error codes are
'1' indicates that the iteration limit 'maxit' had been reached.
'51' indicates a warning from the optimization method; see component 'message' for further details.
'52' indicates an error from the "L-BFGS-B" method; see component 'message' for further details.
A character string giving any additional information returned by the optimizer, or 'NULL'.
If the model has only one predictor a single formula indicating the model for that predictor. If the model has two predictors, then formula is a list with terms pred.long and pred.short indicating the model for the long and short term predictor respectively.
The 'terms' object used.
If the model has one predictor, number of columns in the model matrix. If it has 2 predictors list with terms pred.short and pred.long indicating the number of columns in the model matrix of the longa and short term predictors respectively.
If requested is the model matrix in the case of nlt models with one predictor. If the nltm has 2 predictors, x is a list with terms pred.long and pred short containing the model matrix for the long and short-term predictors respectively.
If requested, the response matrix.
If requested is the model frame in the case of nlt models with one predictor. If the nltm has 2 predictors, is a list with terms pred.long and pred short containing the model frame for the long and short-term predictors respectively.
Number or predictors.
The call of the nltm model.
The na.action
attribute, if any, that was returned by the
na.action
routine.
The object will also contain the following, for documentation see the lm
object: terms
, assign
, formula
, call
, and, optionally, x
, y
,
and/or frame
.
Tsodikov A., Garibotti G. (2006) "Profile information matrix for nonlinear transformation models". to appear in Journal of Lifetime Data Analysis.
This function finds confidence intervals for relative
risks and calculates the log-likelihood test. It is a method for the
generic function summary
of class nltm
. It can be
invoked by calling summary for an object of class nltm.
## S3 method for class 'nltm' summary(object, coef = TRUE, conf.int = 0.95, digits = max(options()$digits - 4, 3),...)
## S3 method for class 'nltm' summary(object, coef = TRUE, conf.int = 0.95, digits = max(options()$digits - 4, 3),...)
object |
Fitted model object of class |
coef |
If true it gives a table with coefficients, standard errors and p-values. Default is TRUE. |
conf.int |
Confidence level of confidence intervals for relative risks. If 0 confidence intervals are not computed. Default is 0.95. |
digits |
Number of digits used for formatting output. |
... |
Arguments to be passed to or from other methods. |
# fit a Proportional Odds Model data(melanoma, package="nltm") fit <- nltm(Surv(time,status) ~ size + age, data=melanoma, nlt.model="PO") summary(fit)
# fit a Proportional Odds Model data(melanoma, package="nltm") fit <- nltm(Surv(time,status) ~ size + age, data=melanoma, nlt.model="PO") summary(fit)