cond.ranefs | R Documentation |
Obtain the conditional distribution of the random effects of a joint
model
fit. This is achieved by a Metropolis scheme. Approximate normality across random effects is
expected, and could be useful in diagnosing potential issues surrounding model fits.
cond.ranefs(fit, burnin = 500L, N = 3500L, tune = 2)
fit |
a joint model fit by the |
burnin |
Number of burn-in iterations to discard, defaults to 500. |
N |
Number of MC iterations to carry out post burn-in, defaults to 3500. |
tune |
Tuning parameter, problem-specific, defaults to 2. |
A list of class cond.b.joint
containing:
A list of length n
containing the history of b_i
post burn-in.
A numeric vector containing the acceptance rate for each sampled subject.
The ModelInfo list from joint
. Used by S3 methods for class
cond.b.joint
.
Posterior estimates at MLEs for the random effects. Same as ranef(joint)
.
The covariances of bhats
.
The MLE estimate for the variance-covariance matrix of random effects from
fit
.
Dimension of random effects.
Number of responses.
The names of the random effects as determined by call to joint
.
The amount of burn-in used.
Number of MC iterations.
tuning parameter used
The number of observations for each subject for each response.
Time taken for cond.ranefs
to complete.
ranef.joint
plot.cond.b.joint
dat <- simData()$data
long.formulas <- list(Y.1 ~ time + cont + bin + (1 + time|id),
Y.2 ~ time + cont + bin + (1 + time|id))
surv.formula <- Surv(survtime, status) ~ bin
fit <- joint(long.formulas, surv.formula, dat, list("gaussian","gaussian"))
cond.b <- cond.ranefs(fit, burnin = 50L, N = 1000, tune = 2)
cond.b
plot(cond.b) # Overall
plot(cond.b, id = 1) # Plot the first subject (see plot.cond.b.joint).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.