a_priori_estimation: A priori estimaion

View source: R/a_priori_estimation.R

a_priori_estimationR Documentation

A priori estimaion

Description

This function provides estimations for the sample size required for the event that at least a minimum number of participants used the desired devices to have a specified minimum probability. By default, the function returns the screening procedure that requires the smallest sample size for this event. To return screening procedures with similar required sample sizes use the parameter tolerance.

Usage

a_priori_estimation(
  screening_strat,
  devices = "HP",
  baserate_hp = 211/1194,
  switch_to_target = NA,
  min_number,
  min_prob = 0.8,
  tolerance = as.integer(0)
)

Arguments

screening_strat

three-letter lower-case abbreviation of the screening strategy. See screening_strategies

devices

Sets the desired playback device. Possible settings are "HP" for headphones or "LS" for loudspeakers.

baserate_hp

Sets the (estimated) prevalence of headphones in the target population as a number between 0 and 1. Defaults to the unbiased prevalence B of 0.1767 from \insertCiteHALT_2;textualHALT.

switch_to_target

Sets the (estimated) switching prevalence. The switching prevalence describes the probability that a participant who indicates the use of a device other than the target device actually switches to the target device after being prompted to do so.

min_number

minimum number of participants k who are in the final sample and should have used the correct device. When you use min_number you cannot use min_prob, i.e. min_prob = NULL.

min_prob

(greater than 0, less than 1) for the event that at least an unknown number of participants k who are in the final sample used the correct device. When you use min_prob you cannot use min_number, i.e. min_number = NULL.

Value

A tibble (data frame) with the characteristics of the test procedure(s) and the attribute explanation. This attribute is intended as an explanatory text containing a probabilistic statement for the test procedure requiring the smallest sample size.

Model

The function uses the Normal approximation of the Binomial distribution with continuity correction. For details, see \insertCiteHALT_2;textualHALT.

References

\insertAllCited

klausfrieler/HALT documentation built on March 17, 2023, 6:18 a.m.