Learn R Programming

FastJM (version 1.4.2)

anova: Anova Method for Fitted Joint Models

Description

Performs a likelihood ratio test between two nested joint models.

Usage

# S3 method for jmcs
anova(object, object2, digits = 4, ...)

Value

A table to summarize the likelihood ratio test.

Arguments

object

an object inheriting from class jmcs, nested in object2.

object2

an object inheriting from class jmcs.

digits

the number of significant digits to use when printing. Default is 4.

...

further arguments passed to or from other methods.

Author

Shanpeng Li lishanpeng0913@ucla.edu

See Also

jmcs

Examples

Run this code
# \donttest{
# Fit a joint model
fit <- jmcs(ydata = ydata, cdata = cdata, 
            long.formula = response ~ time + x1, 
            surv.formula = Surv(surv, failure_type) ~ x1 + x2, 
            random =  ~ time| ID)

fit2 <- jmcs(ydata = ydata, cdata = cdata, 
            long.formula = response ~ time + gender + x1 + race, 
            surv.formula = Surv(surv, failure_type) ~ x1 + gender + x2 + race, 
            random =  ~ time| ID)      

anova(fit, fit2)   
# }
             

Run the code above in your browser using DataLab