retro_design: retro_design: Calculates Power, Type S, and Type M error

retro_designR Documentation

retro_design: Calculates Power, Type S, and Type M error

Description

This function name is deprecated in favor of the more clearly named retro_design_closed_form; it won't be removed in any hurry, just trying to move the naming conventions to be clearer and easier to use.

Usage

retro_design(A, s, alpha = 0.05)

Arguments

A

a numeric or list, an estimate of the true effect size

s

a numeric, standard error of the estimate

alpha

a numeric, the statistical significance threshold

Details

Calculates Power, Type S, and Type M error and returns them in a list or df, depending on whether a single true effect size or range is provided. Uses the closed form solution found for the Type-M error found by Lu et al. (2018), and thus is faster than retrodesign. For t distributions, use retrodesign() instead; the closed form solution only applies in the normal case.

Value

either a list of length 3 containing the power, type s, and type M error, or if A is a list, a df that is 4 by length(A), with an effect size and it's corresponding power, type s, and type m errors in each row.

Examples

retrodesign(1,3.28)
retrodesign(list(.2,2,20),8.1)

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