paugmented: Calculate paugmented

Description Usage Arguments Examples

View source: R/paugmented function.r

Description

This function calculates paugmented, a statistic discussed in Sagarin, Ambler, and Lee's (2014, Perspectives on Psychological Science, 9, 293-304) "An Ethical Approach to Peeking at Data".

Usage

1
paugmented(ns, plargest, pfinal, pcrit = 0.05, slices = 1000, tails = 2)

Arguments

ns

refers to a vector of sample sizes that indicate the initial number of participants run (N1) followed by the number of participants in the first round of augmentation (N2), the number of participants in the second round of augmentation (N3), etc.

plargest

refers to the largest p-value obtained in the initial or augmented subsamples. For example, if the p-value for the initial N1 participants was .15, the p-value for the combined N1+N2 participants was .18, and the p-value for the combined N1+N2+N3 participants was .04, plargest would be .18.

pfinal

refers to the p-value obtained in the final sample that includes all participants.

pcrit

refers to the value for determining statistical significance (typically .05).

slices

refers to the number of slices to divide the probability distribution (higher numbers of slices will make the calculations slower but more precise).

tails

refers to whether the tests are one- or two-tailed.

Examples

1
2
paugmented(c(40,40,20), plargest = .18, pfinal = .04, pcrit = .05, slices = 1000, tails = 2)
paugmented()

ianhussey/ethicalpeeking documentation built on May 18, 2019, 1:28 a.m.