Sample (NaN values are dropped; for paired samples, the pairs with a NaN).
Optionaly: Sample
Second sample (omit for one sample).
See TTOSTOptions; the bounds are required.
See TTOSTResult.
TypeError without bounds, for options of the wrong type, or for samples that are not arrays of numbers
(null or strings in them); RangeError for infinite values, alpha outside (0, 0.5), bounds that are not finite or
in the wrong order, an unknown choice, or fewer than 2 observations in a sample; Error where the t test has too
few observations or the data are essentially constant.
Two one-sided t tests (TOST) of equivalence, or minimal-effect tests, for one sample, two samples or paired samples, with the standardised mean difference and its interval. Equivalent to
TOSTER::t_TOST()in R.With
hypothesis: "EQU"(the default) equivalence, low < difference < high, is shown at level alpha when both the test of the lower bound (alternative "greater") and that of the upper bound (alternative "less") reject; the p-value is the larger of the two. With"MET"the alternatives are reversed and the p-value is the smaller. The effect is the difference minusmu: mean(x) - mean(y) - mu (two samples, Welch's or pooled), the mean of x - y minus mu (paired) or the mean of x minus mu (one sample). The bounds, the raw estimate and interval and the standardised difference all refer to that effect. The intervals are 1 - 2 alpha intervals (90% for the default alpha 0.05).The standardised difference is Hedges' g (Cohen's d without
biasCorrection) with the average SDsqrt((s1² + s2²)/2)for Welch's test, the pooled SD withvarEqual, the SD of the differences for paired samples (d_z, or d_rm withrmCorrection), the SD of one sample withglass, or the SD for one sample. Its interval is from the noncentral t ("nct", as exact roots; TOSTER's optimiser is about 1e-9 accurate), Goulet-Pelletier and Cousineau's ("goulet"), org -+ q sewith a t or normal quantile ("t","z").Differences from TOSTER (decisions 20-23 of oracle/methodcomparison-behaviour.md):
muis subtracted everywhere (TOSTER tests the bounds on the difference itself, gives the raw interval of the difference, the two-sample SMD of the difference plus mu and the paired SMD without mu); the one-sample"t"and"z"intervals of the standardised difference are 1 - 2 alpha intervals (TOSTER's 1 - alpha); TOSTER's notes are warnings; alpha must be in (0, 0.5). Withmu0 only the last three apply.With 2 observations (df 1) Hedges' correction J(1) is 0: the bias-corrected standardised difference is 0 (and its
"nct"interval), and some of its standard errors and intervals are NaN or infinite, as TOSTER's formulas give.