safeZTestStat {safestats} | R Documentation |
Computes E-Values Based on the Z-Statistic
Description
Computes e-values using the z-statistic and the sample sizes only based on the test defining parameter phiS.
Usage
safeZTestStat(
z,
phiS,
n1,
n2 = NULL,
alternative = c("twoSided", "less", "greater"),
paired = FALSE,
sigma = 1,
...
)
Arguments
z |
numeric that represents the observed z-statistic. |
phiS |
numeric this defines the safe test S, i.e., a likelihood ratio of z distributions with in the denominator the likelihood with mean difference 0 and in the numerator an average likelihood defined by the likelihood at the parameter value. For the two sided case 1/2 at the parameter value and 1/2 at minus the parameter value. |
n1 |
integer that represents the size in a one-sample z-test, (n2= |
n2 |
an optional integer that specifies the size of the second sample. If it's left unspecified, thus,
|
alternative |
a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less". |
paired |
a logical, if |
sigma |
numeric, the assumed known standard deviation, default 1. |
... |
further arguments to be passed to or from methods. |
Value
Returns an e-value.
Examples
safeZTestStat(z=1, n1=100, phiS=0.4)
safeZTestStat(z=3, n1=100, phiS=0.3)