qp_cases_brute: Calculate the number of cases for a particular case target...

Description Usage Arguments Value See Also Examples

View source: R/qcapower.R

Description

qp_cases_brute calculates the number of cases needed for a particular power level. The function starts with the number of cases given by start_value and iteratively simulates power and adjusts the number of cases until the power_target is met or the max_value has been reached. Running the function can take a lot of time. Use qp_cases to

Usage

1
2
3
4
5
6
7
qp_cases_brute(
  power_target,
  start_value = 2,
  max_value = 100,
  progress = TRUE,
  ...
)

Arguments

power_target

Power level target

start_value

Default number of cases for initial search

max_value

Default maximum number of cases for search

progress

Show progress of calculation (default TRUE)

...

qcapower parameters – see qcapower

Value

An integer showing how many cases are needed to achieve the target level of power.

See Also

qp_cases_brute

Examples

1
2
3
4
5
6
7
## Not run: 
qp_cases_brute(power_target = 0.9, null_hypo = 0.80, alt_hypo = 1)

qp_cases_brute(power_target = 0.9, null_hypo = 0.80, alt_hypo = 1, start_value = 20,
               max_value = 50, perms = 500)

## End(Not run)

qcapower documentation built on March 2, 2020, 5:09 p.m.