logLik.joint {gmvjoint} | R Documentation |
Log-likelihood for joint model.
Description
Calculate joint log-likelihood, degrees of freedom, AIC and BIC of joint model fit.
Usage
## S3 method for class 'joint'
logLik(object, conditional = FALSE, ...)
Arguments
object |
a |
conditional |
Logical. Should the conditional or observed data log-likelihood be returned? See details. |
... |
additional arguments (none used). |
Details
Calculate the log-likelihood of a joint model of survival and multivariate longitudinal
data (i.e. a joint
object). The argument conditional
manages whether
or not the log-likelihood conditional on the random effects, or simply
the observed data log-likelihood is returned (the default, conditional = FALSE
).
If conditional = TRUE
, then the log-likelihood conditional on the random
effects is returned. That is
If conditional = FALSE
, then the observed data log-likelihood is returned i.e.
Additionally, the degrees of freedom, is given by
where denotes the number of coefficients estimated for the
th response,
and
the number of dispersion parameters estimated.
denotes
the number of survival coefficients, i.e. the length of
c(zeta, gamma)
. Finally,
all covariance parameters are captured in length(vech(D))
.
With the degrees of freedom, we can additionally compute AIC and BIC, which are defined in no special way; and are calculated using the observed data log-likelihood.
Value
Returns an object of class logLik
, a number which is the log-likelihood
of the fitted model object
. This has multiple attributes: df
which is the
degrees of freedom, df.residual
; the number of residual degrees of freedom;
AIC
and BIC
which are the Akaike or Bayes information criterion evaluated at
either the conditional or observed log-likelihood (as requested by argument
conditional
).
Author(s)
James Murray (j.murray7@ncl.ac.uk)
References
Henderson R, Diggle P, Dobson A. Joint modelling of longitudinal measurements and event time data. Biostatistics 2000; 1(4); 465-480.
Wulfsohn MS, Tsiatis AA. A joint model for survival and longitudinal data measured with error. Biometrics 1997; 53(1); 330-339.
See Also
extractAIC.joint
and anova.joint
Examples
# Bivariate simulated data (2x Gaussian)
data <- simData(n = 100,
D = diag(c(.25, .04, .2, .02)),
gamma = c(0.4, -0.2), theta = c(-2, .2))$data
fit <- joint(list(
Y.1 ~ time + cont + bin + (1 + time|id),
Y.2 ~ time + cont + bin + (1 + time|id)
), Surv(survtime, status) ~ cont + bin,
data = data,
family = list('gaussian', 'gaussian'))
logLik(fit)