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

  • 42f94fc
  • /
  • man
  • /
  • rope_range.Rd
Raw File Download

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
content badge
swh:1:cnt:57ce6e36accbefdccbdc7dafac303b4dfce3eb8d
directory badge
swh:1:dir:6e625a798bfb123b63e7563d8f4b9140f7033c96

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
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
rope_range.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rope_range.R
\name{rope_range}
\alias{rope_range}
\title{Find Default Equivalence (ROPE) Region Bounds}
\usage{
rope_range(x, ...)
}
\arguments{
\item{x}{A \code{stanreg}, \code{brmsfit} or \code{BFBayesFactor} object.}

\item{...}{Currently not used.}
}
\description{
This function attempts at automatically finding suitable "default"
  values for the Region Of Practical Equivalence (ROPE).
}
\details{
\cite{Kruschke (2018)} suggests that the region of practical
  equivalence could be set, by default, to a range from \code{-0.1} to
  \code{0.1} of a standardized parameter (negligible effect size
  according to Cohen, 1988).

  \itemize{
    \item For \strong{linear models (lm)}, this can be generalised to \ifelse{html}{\out{-0.1 * SD<sub>y</sub>, 0.1 * SD<sub>y</sub>}}{\eqn{[-0.1*SD_{y}, 0.1*SD_{y}]}}.
    \item For \strong{logistic models}, the parameters expressed in log odds ratio can be converted to standardized difference through the formula \ifelse{html}{\out{&pi;/&radic;(3)}}{\eqn{\pi/\sqrt{3}}}, resulting in a range of \code{-0.18} to \code{0.18}.
    \item For other models with \strong{binary outcome}, it is strongly recommended to manually specify the rope argument. Currently, the same default is applied that for logistic models.
    \item For models from \strong{count data}, the residual variance is used. This is a rather experimental threshold and is probably often similar to \code{-0.1, 0.1}, but should be used with care!
    \item For \strong{t-tests}, the standard deviation of the response is used, similarly to linear models (see above).
    \item For \strong{correlations}, \code{-0.05, 0.05} is used, i.e., half the value of a negligible correlation as suggested by Cohen's (1988) rules of thumb.
    \item For all other models, \code{-0.1, 0.1} is used to determine the ROPE limits, but it is strongly advised to specify it manually.
  }
}
\examples{
\dontrun{
if (require("rstanarm")) {
  model <- stan_glm(
    mpg ~ wt + gear,
    data = mtcars,
    chains = 2,
    iter = 200,
    refresh = 0
  )
  rope_range(model)

  model <- stan_glm(vs ~ mpg, data = mtcars, family = "binomial")
  rope_range(model)
}

if (require("brms")) {
  model <- brm(mpg ~ wt + cyl, data = mtcars)
  rope_range(model)
}

if (require("BayesFactor")) {
  bf <- ttestBF(x = rnorm(100, 1, 1))
  rope_range(bf)
}
}
}
\references{
Kruschke, J. K. (2018). Rejecting or accepting parameter values in Bayesian estimation. Advances in Methods and Practices in Psychological Science, 1(2), 270-280. \doi{10.1177/2515245918771304}.
}

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— Content policy— Contact— JavaScript license information— Web API