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

View source: R/rfixef.R

fixef.jointR Documentation

Extract fixed effects from a joint object.

Description

Extract fixed effects from a joint object.

Usage

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

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).

Value

A vector containing requested fixed effects.

Author(s)

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

See Also

ranef.joint

Examples

# 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')

gmvjoint documentation built on Oct. 6, 2024, 1:07 a.m.