pactual: Calculate pactual

Description Usage Arguments Examples

View source: R/pactual function.r

Description

This function calculates pactual, 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
2
pactual(ns, pmax = 1, pcrit = 0.05, slices = 1000, tails = 2,
  indent = "")

Arguments

ns

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.

pmax

refers to the maximum p-value in the data collected thusfar such that the researcher would augment the sample with additional 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.

indent

is used to format the countdown when this function is called from pcrit.

Examples

1
2
pactual(c(100,50,25), pmax = .1, pcrit = .05, slices = 1000, tails = 1)
pactual()

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