Helper function: Computes the safe confidence sequence for a z-test
computeConfidenceIntervalZ(
nEff,
meanObs,
phiS,
sigma = 1,
ciValue = 0.95,
alternative = "twoSided",
a = NULL,
g = NULL
)numeric vector that contains the upper and lower bound of the safe confidence sequence
numeric > 0, the effective sample size.
numeric, the observed mean. For two sample tests this is difference of the means.
numeric > 0, the safe test defining parameter.
numeric > 0 representing the assumed population standard deviation used for the test.
numeric is the ciValue-level of the confidence sequence. Default ciValue=0.95.
a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less".
numeric, the centre of the normal prior on population mean (of the normal data). Default
is NULL, which implies the default choice of setting the centre equal to the null hypothesis.
numeric > 0, used to define g sigma^2 as the variance of the normal prior on the population
(of the normal data). Default is NULL in which case g=phiS^2/sigma^2.
computeConfidenceIntervalZ(nEff=15, meanObs=0.3, phiS=0.2)
Run the code above in your browser using DataLab