Learn R Programming

FastJM (version 1.4.2)

plot.jmcs: Fitted values for joint models

Description

Plot Diagnostics for Joint Models.

Usage

# S3 method for jmcs
plot(x, add.smooth = getOption("add.smooth"), ...)

Value

The first two plots are longitudinal sub-model diagnostics and the last two are marginal survival function and marginal cumulative hazard.

Arguments

x

x of class 'jmcs'.

add.smooth

logical; if TRUE a smooth line is superimposed in the "Residuals vs Fitted" plot.

...

further arguments passed to or from other methods.

Author

Shanpeng Li lishanpeng0913@ucla.edu

Examples

Run this code
# \donttest{
fit <- 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)

oldpar <- par(mfrow = c(2, 2))
plot(fit)
par(oldpar)
# }

Run the code above in your browser using DataLab