anova: Anova Method for Fitted Joint Models In drizopoulos/JM: Joint Modeling of Longitudinal and Survival Data

Description

Produces marginal Wald tests or Performs a likelihood ratio test between two nested joint models.

Usage

 ```1 2 3``` ```## S3 method for class 'jointModel' anova(object, object2, test = TRUE, process = c("both", "Longitudinal", "Event"), L = NULL, ...) ```

Arguments

 `object` an object inheriting from class `jointModel`, nested in `object2`. `object2` an object inheriting from class `jointModel`. `test` logical; if `TRUE` the likelihood ratio test is performed. `process` for which of the two submodels to produce the marginal Wald tests table. `L` a numeric matrix of appropriate dimensions defining the contrasts of interest. `...` additional arguments; currently none is used.

Value

An object of class `aov.jointModel` with components,

 `nam0` the name of `object`. `L0` the log-likelihood under the null hypothesis (`object`). `aic0` the AIC value for the model given by `object`. `bic0` the BIC value for the model given by `object`. `nam1` the name of `object2`. `L1` the log-likelihood under the alternative hypothesis (`object2`). `aic1` the AIC value for the model given by `object2`. `bic1` the BIC value for the model given by `object2`. `df` the degrees of freedom for the test (i.e., the difference in the number of parameters). `LRT` the value of the Likelihood Ratio Test statistic (returned if `test = TRUE`). `p.value` the p-value of the test (returned if `test = TRUE`). `aovTab.Y` a data.frame with the marginal Wald tests for the longitudinal process; produced only when `object2` is missing. `aovTab.T` a data.frame with the marginal Wald tests for the event process; produced only when `object2` is missing. `aovTab.L` a data.frame with the marginal Wald tests for the user-defined contrasts matrix; produced only when `object2` is missing and `L` is not `NULL`.

Warning

The code minimally checks whether the models are nested! The user is responsible to supply nested models in order the LRT to be valid.

Author(s)

Dimitris Rizopoulos [email protected]

References

Rizopoulos, D. (2012) Joint Models for Longitudinal and Time-to-Event Data: with Applications in R. Boca Raton: Chapman and Hall/CRC.

Rizopoulos, D. (2010) JM: An R Package for the Joint Modelling of Longitudinal and Time-to-Event Data. Journal of Statistical Software 35 (9), 1–33. http://www.jstatsoft.org/v35/i09/

`jointModel`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ```## Not run: # linear mixed model fit without treatment effect fitLME.null <- lme(sqrt(CD4) ~ obstime, random = ~ 1 | patient, data = aids) # cox model fit without treatment effect fitCOX.null <- coxph(Surv(Time, death) ~ 1, data = aids.id, x = TRUE) # joint model fit without treatment effect fitJOINT.null <- jointModel(fitLME.null, fitCOX.null, timeVar = "obstime", method = "weibull-PH-aGH") # linear mixed model fit with treatment effect fitLME.alt <- lme(sqrt(CD4) ~ obstime * drug - drug, random = ~ 1 | patient, data = aids) # cox model fit with treatment effect fitCOX.alt <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE) # joint model fit with treatment effect fitJOINT.alt <- jointModel(fitLME.alt, fitCOX.alt, timeVar = "obstime", method = "weibull-PH-aGH") # likelihood ratio test for treatment effect anova(fitJOINT.null, fitJOINT.alt) ## End(Not run) ```