computeConfidenceIntervalZ {safestats}R Documentation

Helper function: Computes the safe confidence sequence for a z-test

Description

Helper function: Computes the safe confidence sequence for a z-test

Usage

computeConfidenceIntervalZ(
  nEff,
  meanObs,
  phiS,
  sigma = 1,
  ciValue = 0.95,
  alternative = "twoSided",
  a = NULL,
  g = NULL
)

Arguments

nEff

numeric > 0, the effective sample size.

meanObs

numeric, the observed mean. For two sample tests this is difference of the means.

phiS

numeric > 0, the safe test defining parameter.

sigma

numeric > 0 representing the assumed population standard deviation used for the test.

ciValue

numeric is the ciValue-level of the confidence sequence. Default ciValue=0.95.

alternative

a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less".

a

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.

g

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.

Value

numeric vector that contains the upper and lower bound of the safe confidence sequence

Examples

computeConfidenceIntervalZ(nEff=15, meanObs=0.3, phiS=0.2)

[Package safestats version 0.8.7 Index]