(Deprecated function) Empirical power analysis for single-case data
!! This function is deprecated. Please use the power_testSC fucntion !!
The power.testSC
command conducts a Monte-Carlo study on the
test-power and alpha-error of a randomization-test and a
piecewise-regression model. The distribution values of the Monte-Carlo
sample are either specified by the user or estimated based on actual data.
power.testSC( data = NULL, dvar, pvar, mvar, parameters = NULL, stat = c("rand.test", "plm"), test.parameter = c("level", "slope"), rand.test.stat = c("Mean B-A", "B"), cases = NULL, rtt = NULL, level = NULL, slope = NULL, MT = NULL, B.start = NULL, trend = NULL, n_sim = 100, limit = 5, m = NULL, s = NULL, startpoints = NA, extreme.p = 0, extreme.d = c(-4, -3), exclude.equal = "auto", alpha = 0.05, distribution = "normal", silent = TRUE )
data |
A single-case data frame. See |
dvar |
Character string with the name of the dependent variable. Defaults to the attributes in the scdf file. |
pvar |
Character string with the name of the phase variable. Defaults to the attributes in the scdf file. |
mvar |
Character string with the name of the measurement time variable. Defaults to the attributes in the scdf file. |
parameters |
- |
stat |
Defines the tests the power analysis is computed for. The
default |
test.parameter |
Indicates whether the power and alpha error for a
level effect, a slope effect, or both effects should be estimated. The
default setting |
rand.test.stat |
Defines the statistic the randomization test is based
on. The first values stipulates the statistic for the level-effect
computation and the second value for the slope-effect computation. Default
is |
cases |
Number of cases per study. |
rtt |
Reliability of the underlying simulated measurements. Default is
|
level |
Defines the level increase (effect size d) at the beginning of phase B. |
slope |
Defines the increase in scores - starting with phase B -
expressed as effect size d per MT. |
MT |
Number of measurements (in each study). |
B.start |
Phase B starting point. A single value (e.g., |
trend |
Defines the effect size d of a trend per MT added across the whole data-set. |
n_sim |
Number of sample studies created for the the Monte-Carlo study.
Default is |
limit |
Minimal number of data points per phase in the sample. Default
is |
m |
Mean of the sample distribution the data are drawn from. |
s |
Standard deviation of the sample distribution the data are drawn from. |
startpoints |
Alternative to the |
extreme.p |
Probability of extreme values. |
extreme.d |
Range for extreme values, expressed as effect size
d. |
exclude.equal |
If set to |
alpha |
Alpha level used to calculate the proportion of significant
tests. Default is |
distribution |
Indicates whether the random sample is based on a
|
silent |
If set |
Juergen Wilbert
## 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? mc_par <- list( n_cases = 1, mt = 15, B.start = round(runif (300,5,12)), rtt = 0.8, level = 1.4 ) res <- power.testSC( parameters = mc_par, stat = c("rand.test","hplm"), test.parameter = "level", startpoints = 5:12, n_sim = 100 ) ## Would you achieve higher power by setting up a MBD with three cases? mc_par <- list( n_cases = 3, mt = 15, B.start = round(runif (300,5,12)), rtt = 0.8, level = 1.4 ) power.testSC( parameters = mc_par, stat = c("rand.test","hplm"), test.parameter = "level", startpoints = 5:12, n_sim = 10 )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.