fitted.joint | R Documentation |
returns the fitted values from a joint
object. Note that the
linear predictor for each k=1,\dots,K
response is returned.
## S3 method for class 'joint'
fitted(object, as = "matrix", ...)
object |
a joint model fit by the |
as |
should the fitted values be returned as a |
... |
Additional arguments (none used). |
A matrix (or list) with a column (or list entry) for each of the fitted linear
predictors with class fitted.joint
.
James Murray (j.murray7@ncl.ac.uk).
residuals.joint
# Bivariate fit on PBC data -----------------------------------------
data(PBC)
# Subset data and remove NAs
PBC <- subset(PBC, select = c('id', 'survtime', 'status', 'drug', 'time',
'albumin', 'platelets'))
PBC <- na.omit(PBC)
# Specify bivariate fit
long.formulas <- list(
albumin ~ time*drug + (1 + time|id),
platelets ~ time * drug + (1 + time|id)
)
surv.formula <- Surv(survtime, status) ~ drug
fit <- joint(long.formulas, surv.formula, PBC, family = list('gaussian', 'poisson'))
fitted(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.