Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cran/bayestestR
04 June 2025, 07:26:28 UTC
  • Code
  • Branches (32)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/0.1.0
    • refs/tags/0.10.0
    • refs/tags/0.10.5
    • refs/tags/0.11.0
    • refs/tags/0.11.5
    • refs/tags/0.12.1
    • refs/tags/0.13.0
    • refs/tags/0.13.1
    • refs/tags/0.13.2
    • refs/tags/0.14.0
    • refs/tags/0.15.0
    • refs/tags/0.15.1
    • refs/tags/0.15.2
    • refs/tags/0.15.3
    • refs/tags/0.16.0
    • refs/tags/0.2.0
    • refs/tags/0.2.2
    • refs/tags/0.2.5
    • refs/tags/0.3.0
    • refs/tags/0.4.0
    • refs/tags/0.5.0
    • refs/tags/0.5.1
    • refs/tags/0.5.2
    • refs/tags/0.5.3
    • refs/tags/0.6.0
    • refs/tags/0.7.0
    • refs/tags/0.7.2
    • refs/tags/0.7.5
    • refs/tags/0.8.0
    • refs/tags/0.8.2
    • refs/tags/0.9.0
    No releases to show
  • 6366c5f
  • /
  • man
  • /
  • eti.Rd
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:7cfab79fe46502b76073fdb0e3bcb3683085d91d
origin badgedirectory badge Iframe embedding
swh:1:dir:c6af825e5badebc12993a8ee9968fab1be48d8d0
origin badgerevision badge
swh:1:rev:40f7c88ddf855896018cf20ec8a7ac5fbd0ea2fb
origin badgesnapshot badge
swh:1:snp:5ae2939d3096a6dfbe0f03f295e3c5c9ab8f4cbc
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 40f7c88ddf855896018cf20ec8a7ac5fbd0ea2fb authored by Dominique Makowski on 27 January 2020, 05:30:28 UTC
version 0.5.1
Tip revision: 40f7c88
eti.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eti.R
\name{eti}
\alias{eti}
\alias{eti.numeric}
\alias{eti.data.frame}
\alias{eti.MCMCglmm}
\alias{eti.sim.merMod}
\alias{eti.sim}
\alias{eti.emmGrid}
\alias{eti.stanreg}
\alias{eti.brmsfit}
\alias{eti.BFBayesFactor}
\title{Equal-Tailed Interval (ETI)}
\usage{
eti(x, ...)

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

\method{eti}{data.frame}(x, ci = 0.89, verbose = TRUE, ...)

\method{eti}{MCMCglmm}(x, ci = 0.89, verbose = TRUE, ...)

\method{eti}{sim.merMod}(
  x,
  ci = 0.89,
  effects = c("fixed", "random", "all"),
  parameters = NULL,
  verbose = TRUE,
  ...
)

\method{eti}{sim}(x, ci = 0.89, parameters = NULL, verbose = TRUE, ...)

\method{eti}{emmGrid}(x, ci = 0.89, verbose = TRUE, ...)

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

\method{eti}{brmsfit}(
  x,
  ci = 0.89,
  effects = c("fixed", "random", "all"),
  component = c("conditional", "zi", "zero_inflated", "all"),
  parameters = NULL,
  verbose = TRUE,
  ...
)

\method{eti}{BFBayesFactor}(x, ci = 0.89, verbose = TRUE, ...)
}
\arguments{
\item{x}{Vector representing a posterior distribution. Can also be a
\code{stanreg}, \code{brmsfit} or a \code{BayesFactor} model.}

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

\item{ci}{Value or vector of probability of the (credible) interval - CI (between 0 and 1)
to be estimated. Default to \code{.89} (89\%).}

\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.}
}
\value{
A data frame with following columns:
  \itemize{
    \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.
  }
}
\description{
Compute the \strong{Equal-Tailed Interval (ETI)} of posterior distributions using the quantiles method. The probability of being below this interval is equal to the probability of being above it. The ETI can be used in the context of uncertainty characterisation of posterior distributions as \strong{Credible Interval (CI)}.
}
\details{
Unlike equal-tailed intervals (see \code{eti()}) that typically exclude 2.5\%
from each tail of the distribution and always include the median, the HDI is
\emph{not} equal-tailed and therefore always includes the mode(s) of posterior
distributions.
\cr \cr
By default, \code{hdi()} and \code{eti()} return the 89\% intervals (\code{ci = 0.89}),
deemed to be more stable than, for instance, 95\% intervals (\cite{Kruschke, 2014}).
An effective sample size of at least 10.000 is recommended if 95\% intervals
should be computed (\cite{Kruschke, 2014, p. 183ff}). Moreover, 89 indicates
the arbitrariness of interval limits - its only remarkable property is being
the highest prime number that does not exceed the already unstable 95\%
threshold (\cite{McElreath, 2015}).
\cr \cr
A 90\% equal-tailed interval (ETI) has 5\% of the distribution on either
side of its limits. It indicates the 5th percentile and the 95h percentile.
In symmetric distributions, the two methods of computing credible intervals,
the ETI and the \link[=hdi]{HDI}, return similar results.
\cr \cr
This is not the case for skewed distributions. Indeed, it is possible that
parameter values in the ETI have lower credibility (are less probable) than
parameter values outside the ETI. This property seems undesirable as a summary
of the credible values in a distribution.
\cr \cr
On the other hand, the ETI range does change when transformations are applied
to the distribution (for instance, for a log odds scale to probabilities):
the lower and higher bounds of the transformed distribution will correspond
to the transformed lower and higher bounds of the original distribution.
On the contrary, applying transformations to the distribution will change
the resulting HDI.
}
\examples{
library(bayestestR)

posterior <- rnorm(1000)
eti(posterior)
eti(posterior, ci = c(.80, .89, .95))

df <- data.frame(replicate(4, rnorm(100)))
eti(df)
eti(df, ci = c(.80, .89, .95))
\dontrun{
library(rstanarm)
model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0)
eti(model)
eti(model, ci = c(.80, .89, .95))

library(emmeans)
eti(emtrends(model, ~1, "wt"))

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

library(BayesFactor)
bf <- ttestBF(x = rnorm(100, 1, 1))
eti(bf)
eti(bf, ci = c(.80, .89, .95))
}

}

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API