## Contents ##
----------
### datasets.Rdata ###
Contains three datasets that use masked priming and a Latin square design
- adelman: orhographic priming + lexical decision
- hutchinson_ld: semantic priming + lexical decision
- hutchinson_naming: semantic priming + naming
A description of the datasets is provided in **power_functions.R**
### power_functions.R ###
Provides basic functions for a power simulation
- **sample_data**: sample participants and items from one of the three datasets
- **simulate_data**: simulate results of an experiment given a sample size, effect size and variance compents
- **minF'**: compute minF', also return intermediate steps (F1 and F2)
- **fit_mixed**: fit a mixed effects model on the data, decide if random slopes are necessary based on likelihood ratio test and convergence of the model.
### power_example.R ###
Example of a power analysis using sampling or simulation
The first part of the script is an analysis of the Adelman dataset. This analysis provides the starting values (effect size and variance components) for the simulation.
The second part shows how to generate data under that model and use that to compute the power dependent on sample size.
The last part is an example that generates data by sampling from a real dataset.
## References ##
----------
Adelman, J. S., Johnson, R. L., McCormick, S. F., McKague, M., Kinoshita, S., Bowers, J. S., . . . others (2014). A behavioral database for masked form priming. *Behavior research methods*, 46(4), 1052–1067.
Hutchison, K. A., Balota, D. A., Neely, J. H., Cortese, M. J., Cohen-Shikora, E. R., Tse, C.-S., ... Buchanan, E. (2013). The semantic priming project. *Behavior research methods*, 45(4), 1099–1114.