terpstrapower: Power for the nonparametric Terpstra test for an ordered...

View source: R/terpstrapower.R

terpstrapowerR Documentation

Power for the nonparametric Terpstra test for an ordered effect.

Description

terpstrapower approximates power for the one-sided Terpstra test, using a normal approximation with expectations under the null and alternative, and using the null standard deviation.

Usage

terpstrapower(
  nreps,
  shifts,
  distname = c("normal", "logistic"),
  level = 0.025,
  mc = 0
)

Arguments

nreps

The numbers in each group.

shifts

The offsets for the various populations, under the alternative hypothesis.

distname

The distribution of the underlying observations; normal and logistic are currently supported.

level

The test level.

mc

Zero indicates asymptotic calculation. Positive for MC calculation.

Details

The standard normal-theory power formula is used.

Value

A list with components power, giving the power approximation, expect, giving null and alternative expectations, var, giving the null variance, probs, giving the intermediate output from pairwiseprobability, and level.

Examples

terpstrapower(rep(10,3),c(0,1,2),"normal")
terpstrapower(c(10,10,10),0:2,"normal",mc=1000)

MultNonParam documentation built on Aug. 30, 2023, 9:09 a.m.