retrodesign.numeric: Numeric retrodesign

View source: R/simple_hypothesis_tests.R

retrodesign.numericR Documentation

Numeric retrodesign

Description

retrodesign.numeric is the S3 method of the generic retrodesign() function, used when a single numeric is passed for A. Martijn Weterings kindly provided code to slightly improve this in the very low N case using the non-central t-distribution.

Usage

## S3 method for class 'numeric'
retrodesign(A, s, alpha = 0.05, df = Inf, n.sims = 10000)

Arguments

A

a numeric, an estimate of the true effect size

s

a numeric, standard error of the estimate

alpha

a numeric, the statistical significance threshold

df

a numeric, the degrees of freedom. df=Inf is equivalent to a normal distribution.

n.sims

a numeric, how many times to simulate when calculating Type M error

Value

A list of length 3 containing the power, type s, and type M error.

Examples

retrodesign(1,3.28)
retrodesign(2,8.1)
retrodesign(.5,1,df=10)

retrodesign documentation built on May 29, 2024, 4:39 a.m.