March 2019
Beginner to intermediate
448 pages
13h 14m
English
Computing the cAIC for mixed models is a nontrivial issue, but fortunately it can be done with the cAIC4 package. In this recipe we will formulate seven versions of our model for deal sizes; we will also add some noise variables into some of the models. If cAIC4 works as expected, it should penalize those models more than the rest:
library("lme4") library("glmmLasso") library(cAIC4) set.seed(25) data = read.csv("C:\\R_book\\sample_random_regression.csv") data$clientid = as.factor(data$clientid) data$ERR_1 = rnorm(100,0,10) data$ERR_2 ...Read now
Unlock full access