anova | R Documentation |
Produces marginal Wald tests or Performs a likelihood ratio test between two nested joint models.
## S3 method for class 'jointModel' anova(object, object2, test = TRUE, process = c("both", "Longitudinal", "Event"), L = NULL, ...)
object |
an object inheriting from class |
object2 |
an object inheriting from class |
test |
logical; if |
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. |
An object of class aov.jointModel
with components,
nam0 |
the name of |
L0 |
the log-likelihood under the null hypothesis ( |
aic0 |
the AIC value for the model given by |
bic0 |
the BIC value for the model given by |
nam1 |
the name of |
L1 |
the log-likelihood under the alternative hypothesis ( |
aic1 |
the AIC value for the model given by |
bic1 |
the BIC value for the model given by |
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 |
p.value |
the p-value of the test (returned if |
aovTab.Y |
a data.frame with the marginal Wald tests for the longitudinal process;
produced only when |
aovTab.T |
a data.frame with the marginal Wald tests for the event process;
produced only when |
aovTab.L |
a data.frame with the marginal Wald tests for the user-defined contrasts matrix;
produced only when |
The code minimally checks whether the models are nested! The user is responsible to supply nested models in order the LRT to be valid.
Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl
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. doi: 10.18637/jss.v035.i09
jointModel
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.