Distribution class of a squared normal distribution
Source:R/ChiSquaredDistribution.R
ZSquared-class.Rd
Implementation of \(Z^2\), where \(Z\) is normally distributed with mean
\(\mu\) and variance \(\sigma^2\). \(Z^2\) is chi-squared distributed
with \(1\) degree of freedom and non-centrality parameter \((\mu/\sigma)^2\).
The function get_tau_ZSquared
computes the factor \(\tau=(\mu/\sigma)^2\),
such that \(\tau\) is the equivalent of \(\theta\) in the normally
distributed case. The square of a normal distribution \(Z^2\) can be used
for two-sided hypothesis testing.
Examples
zsquared <- ZSquared(FALSE)
H1 <- PointMassPrior(get_tau_ZSquared(0.4, 1), 1)