% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input-priors.R
\name{estimate_unit_information_sd}
\alias{estimate_unit_information_sd}
\title{Estimate Unit Information Standard Deviation}
\usage{
estimate_unit_information_sd(sei, ni)
}
\arguments{
\item{sei}{a complete numeric vector of strictly positive standard errors
for each study.}

\item{ni}{a complete numeric vector of strictly positive sample sizes for
each study, with the same length as \code{sei}.}
}
\value{
Returns a single numeric value representing the estimated unit
information standard deviation.
}
\description{
Estimates the unit information standard deviation (UISD) from
sample sizes and standard errors. The UISD is used to scale weakly informative
prior distributions for meta-analytic parameters.
}
\details{
The unit information standard deviation is computed following Equation 6 in
\insertCite{rover2021weakly;textual}{RoBMA}:
\deqn{\text{UISD} = \sqrt{\frac{\sum n_i}{\sum \text{se}_i^{-2}}}}
where \eqn{n_i} is the sample size and \eqn{\text{se}_i} is the standard error
for each study.

This function is useful when you want to compute the UISD once and pass it
to multiple analyses via the \code{prior_unit_information_sd} argument in
\code{\link[=brma]{brma()}} or related functions. This ensures consistent prior scaling
across analyses performed on different subsets of the same data.
}
\examples{
# Example with simulated data
sei <- c(0.2, 0.3, 0.25, 0.15)
ni  <- c(50, 30, 40, 80)
estimate_unit_information_sd(sei = sei, ni = ni)

}
\references{
\insertAllCited{}
}
