This tutorial was presented at the University of Oregon Developmental Seminar, May 3, 2019.
The repository can be found at: https://github.com/dcosme/specification-curves/
div.grey { background-color:#F5F5F5; border-radius: 5px; padding: 10px;} ❗ Please note a more recent tutorial can be found here:
https://dcosme.github.io/specification-curves/SCA_tutorial_inferential
background The problem: there are many different ways to test a model and we usually only report one or a few specifications. Model selection relies on choices by the researcher and these are often artbitrary and sometimes driven by a desire for significant results.
I was inspired by these amazing examples of specification curves by Julia Rohrer and Amy Orben, so I wrote some code to generate a curve like this:
Below is code to create a specification curve using a toy example from the airquality dataset. Enjoy!
load packages library(tidyverse) library(lme4) library(MuMIn) library(cowplot) run models Run all possible nested models using the dredge function from the MuMIn package.
# set na.