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 |

`tune` |
Tuning parameter, problem-specific, defaults to 2. |

A list of class `cond.b.joint`

containing:

- walks
A list of length

`n`

containing the history of`b_i`

post burn-in.- acceptance
A numeric vector containing the acceptance rate for each sampled subject.

- M
The ModelInfo list from

`joint`

. Used by S3 methods for class`cond.b.joint`

.- bhats
Posterior estimates at MLEs for the random effects. Same as

`ranef(joint)`

.- Sigmahats
The covariances of

`bhats`

.- D
The MLE estimate for the variance-covariance matrix of random effects from

`fit`

.- q
Dimension of random effects.

- K
Number of responses.

- qnames
The names of the random effects as determined by call to

`joint`

.- burnin
The amount of burn-in used.

- N
Number of MC iterations.

- tune
tuning parameter used

- nobs
The number of observations for each subject for each response.

- elapsed.time
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).
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.