Learn R Programming

gmvjoint (version 0.4.0)

fixef.joint: Extract fixed effects from a joint object.

Description

Extract fixed effects from a joint object.

Usage

# S3 method for joint
fixef(object, what = c("long", "surv"), ...)

Value

A vector containing requested fixed effects.

Arguments

object

a joint model fit by the joint function.

what

character string. Should the "long"itudinal process(es) be extracted, or the "surv"ival ones?

...

additional arguments (none used).

Author

James Murray (j.murray7@ncl.ac.uk).

See Also

ranef.joint

Examples

Run this code
# Univariate fit on PBC data -------------------------------------------
data(PBC)

# Subset data and remove NAs
PBC <- subset(PBC, select = c('id', 'survtime', 'status', 'drug', 'time',
                              'albumin'))
PBC <- na.omit(PBC) 

# Specify simple univariate fit
long.formulas <- list(
  albumin ~ time + (1 + time|id)
)
surv.formula <- Surv(survtime, status) ~ drug

fit <- joint(long.formulas, surv.formula, PBC, family = list('gaussian'))

fixef(fit, 'long')
fixef(fit, 'surv')

Run the code above in your browser using DataLab