str(dat <- simDat13()) # Implicit default arguments
# Revert to main-effects model with parallel lines on the log link scale
str(dat <- simDat13(nSample = 100, beta.vec = c(-2, 1, 2, 4, 0, 0)))
# Same with less strong regression coefficient
str(dat <- simDat13(nSample = 100, beta.vec = c(-2, 1, 2, 3, 0, 0)))
# Revert to simple linear Poisson regression: no effect of population (and less strong coefficient)
str(dat <- simDat13(nSample = 100, beta.vec = c(-2, 0, 0, 3, 0, 0)))
# Revert to one-way ANOVA Poisson model: no effect of wing length
# (Choose larger sample size and greater differences in the intercepts to better show patterns)
str(dat <- simDat13(nSample = 100, beta.vec = c(-1, 3, 5, 0, 0, 0)))
# Revert to Poisson "model-of-the-mean": no effects of either wing length or population
# Intercept chosen such that average parasite load is 10
str(dat <- simDat13(nSample = 100, beta.vec = c(log(10), 0, 0, 0, 0, 0)))
mean(dat$load) # Average is about 10
Run the code above in your browser using DataLab