safeTTestStat {safestats}R Documentation

Computes E-Values Based on the T-Statistic

Description

A summary stats version of safeTTest() with the data replaced by t, n1 and n2, and the design object by deltaS.

Usage

safeTTestStat(
  t,
  parameter,
  n1,
  n2 = NULL,
  alternative = c("twoSided", "less", "greater"),
  tDensity = FALSE,
  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.

n1

integer that represents the size in a one-sample t-test, (n2=NULL). When n2 is not NULL, this specifies the size of the first sample for a two-sample test.

n2

an optional integer that specifies the size of the second sample. If it's left unspecified, thus, NULL it implies that the t-statistic is based on one-sample.

alternative

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

tDensity

Uses the the representation of the safe t-test as the likelihood ratio of t densities.

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]