| covratio.brma | R Documentation |
Computes COVRATIO for a fitted brma object. COVRATIO measures
the change in the determinant of the covariance matrix of the estimates
when observation i is removed.
## S3 method for class 'brma'
covratio(model, type = "mods", ...)
model |
a fitted brma object. |
type |
type of parameters to be summarized. Defaults to |
... |
additional arguments. The internal |
COVRATIO is computed using importance sampling weights to approximate the
leave-one-out covariance matrices without refitting the model.
Estimate-unit LOO must first be computed with
model <- add_loo(model, unit = "estimate"), unless internal weights
are supplied.
COVRATIO_i = \frac{\det(Cov(\beta)_{-i})}{\det(Cov(\beta))}
Values > 1 indicate that the observation improves precision (decreases
variance), while values < 1 indicate that the observation decreases precision
(increases variance).
If any included parameter has zero posterior variance, or if a full or LOO
covariance determinant is zero or non-finite, COVRATIO is undefined. In that
case, values are reported as NaN with a printed note when available.
A named numeric vector of COVRATIO values, one for each observation.
influence.brma, dffits.brma, cooks.distance.brma
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
fit <- bPET(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
fit <- add_loo(fit)
covratio(fit)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.