safeTTestStatAlpha {safestats} | R Documentation |
safeTTestStat() Subtracted with 1/alpha.
Description
This is basically just safeTTestStat()
- 1/alpha. This function is used for root finding for
pilot designs.
Usage
safeTTestStatAlpha(
t,
parameter,
n1,
n2 = NULL,
alpha,
alternative = c("twoSided", "greater", "less"),
tDensity = FALSE
)
Arguments
t |
numeric that represents the observed t-statistic. |
parameter |
numeric this defines the safe test S, i.e., a likelihood ratio of t distributions with in the denominator the likelihood with delta = 0 and in the numerator an average likelihood defined by 1/2 time the likelihood at the non-centrality parameter sqrt(nEff)*parameter and 1/2 times the likelihood at the non-centrality parameter -sqrt(nEff)*parameter. |
n1 |
integer that represents the size in a one-sample t-test, (n2= |
n2 |
an optional integer that specifies the size of the second sample. If it's left unspecified, thus,
|
alpha |
numeric > 0 only used if pilot equals |
alternative |
a character only used if pilot equals |
tDensity |
Uses the the representation of the safe t-test as the likelihood ratio of t densities. |
Value
Returns a numeric that represent the e10 - 1/alpha, that is, the e-value in favour of the alternative over the null - 1/alpha.
Examples
safeTTestStat(t=1, n1=100, 0.4)
safeTTestStat(t=3, n1=100, parameter=0.3)