Intervals for the parameters of a dmrfit or dmrfit_bayes fit. For a dmrfit fit, the adjusted likelihood-ratio intervals computed with dmrfit(..., lrt_intervals = TRUE) (method = "lrt", see dmrfit), or Wald intervals from the Godambe-Huber-White (GHW) standard errors (method = "wald"). For a dmrfit_bayes fit, highest posterior density intervals of the posterior draws.

# S3 method for class 'dmrfit'
confint(object, parm = NULL, level = NULL, method = c("lrt", "wald"), ...)

Arguments

object

a dmrfit or dmrfit_bayes object.

parm

the parameters, by name (as in names(object$argument)) or position. By default, all free parameters (for a constrained fit, the thresholds and the interactions present in the structure).

level

confidence or credible level. By default, the level of a dmrfit fit (its level argument), and 0.95 for a dmrfit_bayes fit. For method = "lrt", it must be the level of the fit.

method

for a dmrfit fit: "lrt" (default) or "wald". Ignored for a dmrfit_bayes fit.

...

further arguments (currently unused).

Value

a matrix with one row per parameter and the lower and upper bounds as columns.

See also

Examples

data(rads2)
dysphoria <- names(which(attr(rads2, "clusters") == "Dysphoria"))
fit <- dmrfit(rads2[, dysphoria], lrt_intervals = c("mu[1,3]", "theta[2,1]"))
confint(fit, parm = c("mu[1,3]", "theta[2,1]"))
#>                 2.5 %     97.5 %
#> mu[1,3]    -5.6563046 -4.2514844
#> theta[2,1]  0.1691671  0.3654652
confint(fit, parm = c("mu[1,3]", "theta[2,1]"), method = "wald")
#>                 2.5 %     97.5 %
#> mu[1,3]    -5.6400591 -4.2353966
#> theta[2,1]  0.1679942  0.3640876