safeTTestStatTDensity {safestats}R Documentation

safeTTestStat() based on t-densities

Description

This is basically just safeTTestStat() - 1/alpha. This function is used for root finding for pilot designs.

Usage

safeTTestStatTDensity(
  t,
  parameter,
  nu,
  nEff,
  alternative = c("twoSided", "less", "greater"),
  paired = 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.

nu

numeric > 0 representing the degrees of freedom.

nEff

numeric > 0 representing the effective sample size in a two-sample problem. For one-sample problems this is equal to the sample size.

alternative

a character only used if pilot equals TRUE. If pilot equals FALSE, then the alternative specified by the design object is used instead.

paired

a logical indicating whether you want a paired t-test.

...

further arguments to be passed to or from methods.

Value

Returns a numeric that represent the e10, that is, the e-value in favour of the alternative over the null.

Examples

safeTTestStat(t=1, n1=100, 0.4)
safeTTestStat(t=3, n1=100, parameter=0.3)

[Package safestats version 0.8.7 Index]