Contents
How does a power analysis in SIMR work?
A power analysis in simr starts with a model fitted in lme 4. This will typically be based on an analysis of data from a pilot study, but more advanced users can create artificial pilot data from scratch (see Appendix S2). This design allows for a gentle learning curve for any users already familiar with lme 4.
What are the functions of the SIMR package?
This tutorial illustrates some of the functions available within the simr package. Our goal is to provide a gentle learning curve by guiding the user through increasingly complex analyses but adding only a few commands or options at a time. The tutorial uses the simdata data set which is included in the package.
What is the estimated effect size of X?
In this case, the estimated effect size for x is −0·11, which is significant at the 0·01 level using the default z -test. Note that we have deliberately used a very simple model to make this tutorial easy to follow. A proper analysis would, for example, have a larger number of groups, and would consider problems such as overdispersion.
How to use count data with mixed effects?
This paper presents a tutorial using a simple example of count data with mixed effects (with structure representative of environmental monitoring data) to guide the user along a gentle learning curve, adding only a few commands or options at a time.
Which is the best R package for power analysis?
Assessing the capabilities of r packages for power analysis of mixed effects models: pamm (Martin 2012 ), longpower (Donohue & Edland 2013 ), clusterPower (Reich et al. 2012 ), nlmeU (Galecki & Burzykowshi 2013) and simr (this paper).
Which is the most accurate test for GLMMs?
There are a range of tests for GLMMs, which can be fast but approximate, or slow but accurate (Bolker et al. 2009; Verbeke & Molenberghs 2009 ).
How does the effect size and power function work?
In addition to the effect size, the function will compute power for any sample size per condition you enter. Let’s assume you have a friend who told you that they heard from someone else that you now need to use 50 observations in each condition (n = 50), so you plan to follow this trustworthy advice.
How is the interaction effect computed in math?
Let’s see why it is important. Mathematically the interaction effect is computed as the cell mean minus the sum of the grand mean, the marginal mean in each condition of one factor minus the grand mean, and the marginal mean in each condition for the other factor minus grand mean (see Maxwell et al., 2018).
What should I consider before doing a power analysis?
Before starting a power analysis, it is important to consider what sort of effect size you are interested in. Power generally increases with effect size, with larger effects being easier to detect. Retrospective ‘observed power’ calculations, where the target effect size comes from the data, give misleading results (Hoenig & Heisey 2001 ).
How is sample size calculated for mixed models?
With simulation you control all the assumptions. The simr package uses simulation to estimate power fairly flexibly in linear and generalised linear mixed models. Thanks for contributing an answer to Cross Validated!