Learn R Programming

JMbayes (version 0.8-85)

coef: Estimated Coefficients and Confidence Intervals for Joint Models

Description

Extracts estimated coefficients and confidence intervals from fitted joint models.

Usage

# S3 method for JMbayes
coef(object, process = c("Longitudinal", "Event"), …)

# S3 method for JMbayes fixef(object, process = c("Longitudinal", "Event"), …)

# S3 method for JMbayes confint(object, parm = c("all", "Longitudinal", "Event"), …)

Arguments

object

an object inheriting from class JMbayes.

process

for which submodel (i.e., linear mixed model or survival model) to extract the estimated coefficients.

parm

for which submodel (i.e., linear mixed model or survival model) to extract credible intervals.

additional arguments; currently none is used.

Value

A numeric vector or a matrix of the estimated parameters or confidence intervals for the fitted model.

Details

When process = "Event" both methods return the same output. However, for process = "Longitudinal", the coef() method returns the subject-specific coefficients, whereas fixef() only the fixed effects.

See Also

ranef.JMbayes, jointModelBayes

Examples

Run this code
# NOT RUN {
# linear mixed model fit
fitLME <- lme(sqrt(CD4) ~ obstime * drug - drug, 
    random = ~ 1 | patient, data = aids)
# cox model fit
fitCOX <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)

# joint model fit
fitJOINT <- jointModelBayes(fitLME, fitCOX, 
    timeVar = "obstime")

# fixed effects for the longitudinal process
fixef(fitJOINT)

# fixed effects + random effects estimates for the longitudinal 
# process
coef(fitJOINT)

# fixed effects for the event process
fixef(fitJOINT, process = "Event")
coef(fitJOINT, process = "Event")
# }

Run the code above in your browser using DataLab