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.
ZSquared(two_armed = TRUE)
get_tau_ZSquared(mu, sigma = 1)
logical indicating if a two-armed trial is regarded
mean of Z
standard deviation of Z
zsquared <- ZSquared(FALSE)
H1 <- PointMassPrior(get_tau_ZSquared(0.4, 1), 1)