simPowerSCA.Rd
Simulates Power for single case analyses, here the nonoverlap methods. Based on effect size (ES) referring to a bivariate correlation, effect size due to a weekend effect (wES), effect size due to an intervention (iES), number of assessments per day (nbeep) , number of days (ndays), and autocorrelation (ar) alpha level can be corrected for number of tests (ntest) by Bonferroni correctie
simPowerSCA(H0result = NULL, nbeep = 1, ndays, ES, iES = NULL, wES = NULL, phase0Perc = NULL, corPredictors = NULL, ar, prewith = FALSE, ntest = 1, maxiter = 1000)
H0result | results from H0 simulation |
---|---|
nbeep | number of assessments per day |
ndays | number of days |
ES | effect size referring to a bivariate correlation |
iES | effect size due to an intervention |
wES | ffect size due to a weekend effect (seasonal) |
phase0Perc | percentage of the observations in first phase (default = 0.5) |
corPredictors | correlations between predictors |
ar | autocorrelation |
prewith | boolean indicating whether prewithening must be used |
ntest | correction for number of test (default = 1, no correction) |
maxiter | number of replications |
Mainly, this function computes the power estimates, it returns an object containing three lists:
The arguments specified when calling the function
Intermediat objects and values
The results such as the power.
uses functions: lagESM or makeCorrelatedData
res <- simPowerSCA(ndays = 50, ES = 0.40, iES = 0.50, wES = 0.10, phase0Perc = .40, ar = 0.2, prewith = FALSE, maxiter = 1000)#> [1] "ndays: 50" #> [1] "ar: 0.2" #> [1] "ES: 0.4"