str(dat <- simDat8()) # Implicit default arguments (for the model with interactions)
# Model with main effects only (and very large sample size; to minimize sampling error
# and clarify structure of main effects in plot)
str(dat <- simDat8(nSample = 1000, interaction.eff = c(0,0,0,0, 0,0,0,0)))
str(dat <- simDat8(nSample = 10000, interaction.eff = rep(0, 8))) # same, even larger sample size
# Revert to one-way ANOVA model with only effects of pop (with much larger sample size)
str(dat <- simDat8(nSample = 10000, pop.eff = c(-10, -5, 5, 10),
hab.eff = c(0, 0), interaction.eff = rep(0, 8))) # note no effect of habitat
# Revert to one-way ANOVA model with only effects of hab
str(dat <- simDat8(nSample = 10000, pop.eff = c(0, 0, 0, 0),
hab.eff = c(5, 10), interaction.eff = rep(0, 8))) # note no effect of pop
# Revert to "model-of-the-mean"
str(dat <- simDat8(nSample = 10000, pop.eff = c(0, 0, 0, 0),
hab.eff = c(0, 0), interaction.eff = rep(0, 8))) # note no effect of pop nor of h
Run the code above in your browser using DataLab