defineTTestN {safestats}R Documentation

Computes a Sequence of (Effective) Sample Sizes

Description

Helper function that outputs the 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 minimal sample size of the (first) sample when computing the power due to optional stopping. Default lowN is set 1.

highN

integer minimal sample size of the (first) sample when computing the power due to optional stopping. Default highN is set 1e6.

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.


[Package safestats version 0.8.7 Index]