Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

power_test

Empirical power analysis for single-case data


Description

The power_test command conducts a Monte-Carlo study on the test-power and alpha-error of a set of single-cases. The distribution values of the Monte-Carlo sample are either specified by the user or estimated based on actual data.

Usage

power_test(
  design,
  stat = c("plm_level", "rand", "tauU"),
  n_sim = 100,
  alpha = 0.05
)

power_testSC(...)

Arguments

design

An object created by design_rSC

stat

Defines the tests the power analysis is based on. The default stat = c("plm_level", "rand", "tauU") computes a power analysis based on tau_u, randSC and plm analyses. Further possibilities are: "plm_slope", "plm_poisson_level", "plm_poisson_slope", "hplm_level", "hplm_slope", "base_tau".

n_sim

Number of sample studies created for the the Monte-Carlo study. Default is n = 100

alpha

Alpha level used to calculate the proportion of significant tests. Default is alpha = 0.05.

...

Further arguments passed to the function.

Author(s)

Juergen Wilbert

See Also

Examples

## Assume you want to conduct a single-case study with 15 MTs, using a highly reliable test,
## an expected level effect of \eqn{d = 1.4}, and randomized start points between MTs 5
## and 12 can you expect to identify the effect using plm or randomization test?
design <- design_rSC(
  n = 1, phase.design = list(A = 6, B = 9), 
  rtt = 0.8, level = 1.4
)
res <- power_test(design, n_sim = 10)

## Would you achieve higher power by setting up a MBD with three cases?
design <- design_rSC(
  n = 3, phase.design = list(A = 6, B = 9), 
  rtt = 0.8, level = 1.4
)
res <- power_test(design, n_sim = 10, stat = c("hplm_level", "rand"))

scan

Single-Case Data Analyses for Single and Multiple Baseline Designs

v0.51
GPL
Authors
Juergen Wilbert [aut, cre], Timo Lueke [aut]
Initial release
2021-2-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.