% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rho_from_median.R
\name{rho_from_median}
\alias{rho_from_median}
\title{Estimated Correlations from Sample Medians of the Correlated Standard Normal Product Distribution}
\usage{
rho_from_median(x)
}
\arguments{
\item{x}{vector of sample medians}
}
\value{
Vector of estimated correlations, extended for inflated cases.
}
\description{
This code implements estimation from the sample median of the correlation of a product of two correlated standard normal variables.
While this estimation is straightforward from the mean, using the median requires the transformation implemented here because the distribution has heavy tails, so for positive correlations the median is much smaller than the mean.
The median version is desired due to its robustness to outliers.
}
\details{
The highest correlation of \code{rho = 1} results in a median of only \code{q~0.455}.  To permit application to arbitrary data, including data that does not satisfy assumptions and is therefore inflated, the function returns \code{x/q} for elements whose absolute values of \code{x/q} exceed 1, and can therefore return values that exceed [-1, 1].
}
\examples{

# a large number of samples is required for the median to yield an accurate estimate
n <- 10000
rho <- 0.3
x <- median( rprodcor( n, rho ) )
rho_from_median( x )

}
\seealso{
\code{\link[=qprodcor]{qprodcor()}}
}
