Last active
August 27, 2015 05:46
-
-
Save mages/4595e8c3fc0d7da0ac50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modelData <- data.frame( | |
Model=factor(c(rep("Linear model", n), | |
rep("Log-transformed LM", n), | |
rep("Poisson (log)",n), | |
rep("Binomial (logit)",n)), | |
levels=c("Linear model", | |
"Log-transformed LM", | |
"Poisson (log)", | |
"Binomial (logit)"), | |
ordered = TRUE), | |
Temperature=rep(temp, 4), | |
Units_sold=rep(units, 4), | |
rbind(predict(lin.mod), | |
exp(predict(log.lin.mod) + | |
0.5 * mean(extract(log.lin.mod$fit)[["sigma_log_units"]])), | |
predict(pois.mod), | |
predict(bin.mod) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment