defineTTestN: Computes a Sequence of (Effective) Sample Sizes of Z- and...

View source: R/tTest.R

defineTTestNR Documentation

Computes a Sequence of (Effective) Sample Sizes of Z- and T-Tests

Description

Helper function that outputs a sequence of sample sizes, effective sample sizes, and the degrees of freedom depending on the type of T-test. Also used for Z-tests.

Usage

defineTTestN(
  lowN = 3,
  highN = 100,
  ratio = 1,
  testType = c("oneSample", "paired", "twoSample")
)

Arguments

lowN

integer that defines the smallest n of our search space for n.

highN

integer largest sample size of the (first) sample. Default set to 100.

ratio

numeric > 0 representing the randomisation ratio of condition 2 over condition 1. If testType is not equal to "twoSample", or if nPlan is of length(1) then ratio=1.

testType

either one of "oneSample", "paired", "twoSample".

Value

Returns the sample sizes and degrees of freedom.


safestats documentation built on Sept. 6, 2026, 1:06 a.m.