Estimates the statistical power of an affect dynamics time series study for a given sampling, effect size, alpha level and metric of interest. Based on Pirla, Taquet and Quoidbach (2021).

powerAD(individuals, samples, metric, r, p.value = 0.05)

Arguments

individuals

Number of individuals sampled.

samples

Number of affect observations per individual.

metric

Metric of interest. Must be a single character from "Average", "Rel.SD", "SD", "RMSSD", "TKEO", "PAC" or "Autocorrelation".

r

Number from 0.01 to 0.99 indicating the expected effect size (Pearson correlation) of interest.

p.value

Alpha level. Must be one of the following numbers: 0.01, 0.05, 0.001, 0.005, 0.001. Defaults to 0.05.

References

Pirla, Taquet and Quoidbach (2021). ADD REFERENCE

Examples

powerAD(individuals=500, samples=10, metric="SD", r=0.1, p.value=0.01)
#> 
#> Power to detect a Pearson correlation of size r= 0.1 between the Standard Deviation (SD) in affect and a given variable using a two-tailed t-test and an alpha of 0.01 . 
#> 
#> Power is estimated through a linear interpolation using the closest combinations of number of subjects and number of observations per subject included in our main analyses. The following table presents the sampling approaches used in the interpolation:
#> 
#>  Power Individuals Samples
#>   0.12         320      10
#>   0.28         640      10
#> 
#>  -----------------------
#> Linear aproximation of Power under the sampling approach specified ( 500 individuals and 10 observations per individual):
#> 
#> Aprox. Power= 21.05 %
#>  -----------------------
#> How to report:
#> 
#> Power analysis for affect dynamic studies (Pirla et al., 2021) suggests that our sampling strategy achieved a statistical power of 21.05 % to detect a Pearson correlation of size r = 0.1 using a two-tailed t-test with an alpha of 0.01 .
#>  -----------------------
#> Reference:
#> 
#> Pirla, S., Taquet, M., & Quoidbach, J. (2021). Measuring Affect Dynamics: An Empirical Framework. https://doi.org/10.31219/osf.io/x2ywa