Learn R Programming

lame (version 1.3.4)

confint.ame: Bayesian credible intervals for AME model parameters

Description

Returns posterior equal-tailed quantile-based credible intervals (not highest-posterior-density, HPD). Built directly from quantile(object$BETA, c(alpha/2, 1-alpha/2)) and quantile(object$VC, ...). These are Bayesian credible intervals, not frequentist confidence intervals.

Usage

# S3 method for ame
confint(object, parm = NULL, level = 0.95, ...)

# S3 method for lame confint(object, parm = NULL, level = 0.95, ...)

Value

Matrix with one row per parameter and two columns (e.g. "2.5%", "97.5%").

Arguments

object

fitted AME / LAME model.

parm

character vector of parameter names, or numeric indices. When parm is character, both BETA names (e.g. "intercept", "x1_dyad") and variance-component names ("va", "vb", "cab", "rho", "ve") are accepted. NULL (default) returns intervals for all available parameters.

level

credible level (default 0.95).

...

additional arguments (ignored).

Note on interval type

These are equal-tailed quantile intervals, not HPD. For an HPD interval use e.g. coda::HPDinterval on the columns of object$BETA and object$VC directly.