ranef.joint | R Documentation |
joint
object.Return the random effects \hat{\boldsymbol{b}}
which maximises the complete
data log-likelihood at the MLEs \hat{\Omega}
.
## S3 method for class 'joint'
ranef(object, Var = FALSE, ...)
object |
a joint model fit by the |
Var |
logical, should the estimated variance of the random effects at |
... |
additional arguments (none used). |
A matrix
containing required random effects effects. If Var=TRUE
,
instead a list is returned with first element the matrix
of random effects and second a
matrix
of the variances \hat{\Sigma}
. Note that these are posterior modes
of the random effects. Conditional distribution can be found by cond.ranefs
.
James Murray (j.murray7@ncl.ac.uk).
fixef.joint
cond.ranefs
# 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 univariate fit
long.formulas <- list(
albumin ~ time*drug + (1 + time|id)
)
surv.formula <- Surv(survtime, status) ~ drug
fit <- joint(long.formulas, surv.formula, PBC, family = list('gaussian'))
b <- ranef(fit, FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.