Revision fe07bfa906d7e155439160caee538a3449cd3877 authored by Dominique Makowski on 08 April 2019, 08:42:41 UTC, committed by cran-robot on 08 April 2019, 08:42:41 UTC
0 parent
Raw File
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ci.R
\title{Confidence/Credible Interval}
ci(x, ...)

\method{ci}{numeric}(x, ci = 0.9, verbose = TRUE, ...)

\method{ci}{stanreg}(x, ci = 0.9, effects = c("fixed", "random",
  "all"), parameters = NULL, verbose = TRUE, ...)

\method{ci}{brmsfit}(x, ci = 0.9, effects = c("fixed", "random",
  "all"), component = c("conditional", "zi", "zero_inflated", "all"),
  parameters = NULL, verbose = TRUE, ...)
\item{x}{A \code{stanreg} or \code{brmsfit} model , or a vector representing a posterior distribution.}

\item{...}{Currently not used.}

\item{ci}{Value or vector of probability of the interval (between 0 and 1)
to be estimated. Named Credible Interval (CI) for consistency.}

\item{verbose}{Toggle off warnings.}

\item{effects}{Should results for fixed effects, random effects or both be returned?
Only applies to mixed models. May be abbreviated.}

\item{parameters}{Regular expression pattern that describes the parameters that
should be returned. Meta-parameters (like \code{lp__} or \code{prior_}) are
filtered by default, so only parameters that typically appear in the
\code{summary()} are returned. Use \code{parameters} to select specific parameters
for the output.}

\item{component}{Should results for all parameters, parameters for the conditional model
or the zero-inflated part of the model be returned? May be abbreviated. Only
applies to \pkg{brms}-models.}
A data frame with following columns:
    \item \code{Parameter} The model parameter(s), if \code{x} is a model-object. If \code{x} is a vector, this column is missing.
    \item \code{CI} The probability of the credible interval.
    \item \code{CI_low} , \code{CI_high} The lower and upper credible interval limits for the parameters.
Compute Confidence/Credible Intervals (CI) for Bayesian and frequentist models using quantiles.
Documentation is accessible for:
  \item \href{}{Bayesian models}

model <- rstanarm::stan_glm(mpg ~ wt + cyl, data = mtcars)
ci(model, ci = c(.80, .90, .95))

model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
ci(model, ci = c(.80, .90, .95))

back to top