Skip to content

Instantly share code, notes, and snippets.

View djhocking's full-sized avatar

Daniel J. Hocking djhocking

View GitHub Profile
@djhocking
djhocking / predict_vs_simulate.org
Created April 21, 2016 19:21 — forked from tmalsburg/predict_vs_simulate.org
Predict vs simulate in lme4

Predict vs simulate in lme4

For this investigation we are going to use the sleepdata data set from the lme4 package. Here is the head of the data frame:

#purling is in the knitr package
library(knitr)
setwd("C:/ALR/Models/boo") #example using local windows directory, can easily switch
#it can be really simple
purl( "script1.Rmd", "script1.R" )
#just specify the rmd filename, then r filename, with extensions