% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random_parameters.R
\name{random_parameters}
\alias{random_parameters}
\title{Summary information from random effects}
\usage{
random_parameters(model)
}
\arguments{
\item{model}{A mixed effects model (including \code{stanreg} models).}
}
\value{
A data frame with random effects statistics for the variance components,
  including number of levels per random effect group, as well as complete
  observations in the model.
}
\description{
This function extracts the different variance components of a
  mixed model and returns the result as a data frame.
}
\details{
The variance components are obtained from \code{\link[insight]{get_variance}}
  and are denoted as following:
  \subsection{Within-group (or residual) variance}{
    The residual variance, \ifelse{html}{\out{&sigma;<sup>2</sup><sub>&epsilon;</sub>}}{\eqn{\sigma^2_\epsilon}},
    is the sum of the distribution-specific variance and the variance due to additive dispersion.
    It indicates the \emph{within-group variance}.
  }
  \subsection{Between-group random intercept variance}{
    The random intercept variance, or \emph{between-group} variance
    for the intercept (\ifelse{html}{\out{&tau;<sub>00</sub>}}{\eqn{\tau_{00}}}),
    is obtained from \code{VarCorr()}. It indicates how much groups
    or subjects differ from each other.
  }
  \subsection{Between-group random slope variance}{
    The random slope variance, or \emph{between-group} variance
    for the slopes (\ifelse{html}{\out{&tau;<sub>11</sub>}}{\eqn{\tau_{11}}})
    is obtained from \code{VarCorr()}. This measure is only available
    for mixed models with random slopes. It indicates how much groups
    or subjects differ from each other according to their slopes.
  }
  \subsection{Random slope-intercept correlation}{
    The random slope-intercept correlation
    (\ifelse{html}{\out{&rho;<sub>01</sub>}}{\eqn{\rho_{01}}})
    is obtained from \code{VarCorr()}. This measure is only available
    for mixed models with random intercepts and slopes.
  }
  \strong{Note:} For the within-group and between-group variance, variance and standard deviations (which are simply the square root of the variance) are shown.
}
\examples{
if (require("lme4")) {
  data(sleepstudy)
  model <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy)
  random_parameters(model)
}
}
