(μ ij ) E(CatchRate) = μ ij Log(μ ij ) = GearType ij + Temperature ij + FleetDeployment i FleetDeployment i ~ N(0, σ2) Using lme4: m <- glmer(CatchRate ~ GearType + Temperature + (1 | FleetDeployment), family = poisson) FISH 6003 FISH 6003: Statistics and Study Design for Fisheries Brett Favaro 2017 This work is licensed under a Creative Commons Attribution 4.0 International License
in which we gather as the ancestral homelands of the Beothuk, and the island of Newfoundland as the ancestral homelands of the Mi’kmaq and Beothuk. We would also like to recognize the Inuit of Nunatsiavut and NunatuKavut and the Innu of Nitassinan, and their ancestors, as the original people of Labrador. We strive for respectful partnerships with all the peoples of this province as we search for collective healing and true reconciliation and honour this beautiful land together. http://www.mun.ca/aboriginal_affairs/
variable that imparts some sort of nesting structure into your data • Transects • “Strings” or “Fleets” of fishing gear • Individual identity (if you’re taking multiple observations from individuals) • A variable where either: • You don’t care about it, but need to include it to address dependency • You care about measuring the variance within different levels of the random effect • Not repeatable (i.e. “Tank 4” has no inherent, repeatable value) Fixed Effect • A variable with predetermined levels (or ranges) that is of direct interest. • All covariates we have used so far in the course have been fixed effects • E.g. • Age • Sex • Food treatment • Repeatable. (Male in this study meets an agreed-upon definition of male. Age 12 always means Age 12) Recall:
Fish Size increase? 2. As we add food, how much does this relationship adjust upward? Low food → Medium food 3. Allow the regression line to adjust up or down for each tank (some tanks are better than others) 4. Allow the line to adjust up or down for each individual fish (some fish are better at growing than others) This model basically says there will be one regression line for every single fish. All have the same slope, but are adjusted up or down (i.e. their intercept shifts based on treatment (fixed), tank (random), and fish ID (random) Fixed part: Random part:
• Thick line is “for a typical group” • Thin lines are regression lines for each specific group Zuur et al. 2010 • Random intercept, random slope model
) = σ2 Sizeij = β0 + FoodTreatmentij + ai ai ~ N(0, σ2 Tank ) Surprise! You have already done a GLMM! A GLMM is just a mixed effects model that meets the above specification Gaussian distribution Identity link Predictor function Specification of fixed and random components
this lecture • The underlying mathematics are complicated: • See previous slide: Parameter estimation differs across packages • Inference (i.e. “Is this a statistically significant effect?”) can be constructed many ways, and packages use different approaches • For small datasets, GLMMs may not work at all • When designing your study, minimize complexity to streamline analysis. While you CAN usually fit complex models, more can go wrong. I have posted links to some good self-study resources on the course website.
exploration Same validation, which depends on distribution - e.g. Poisson = check for overdispersion - e.g. Gaussian = check for homogeneity of variance, and approx. normality - Check residuals vs. fitted values - And check for patterns of residuals vs. covariates in and out of the model Same model selection - But you may also want to compare models with different random effects structures - Can use AIC to do this. But try to define your random effects structure a priori
better trap designs improve catch rates of green crab? Does it matter which bait we use to catch green crab? Which is best? Do green crabs reduce lobster catch by messing with the traps?
crab? Which is best? Today’s dataset: Desirable to maximize CPUE of green crab. While we have no idea how many green crabs can exist in an ecosystem before they cause damage, we believe removing them helps mitigate the damage they cause. • Field data collected in summer 2016 • Green crabs were caught using standard Fukui traps • CPUE with four bait types compared: • Herring (default), mussels, squid, cod • Key Questions: • Which catches most? • Which catches biggest?
TrapID Location Block FH/NH A B C D Slot 1,2,3,4 … Replicates Herring Mussel Cod Squid - Each slot should experience each bait - Note: Need >5 levels for random effect (We will lump Block/Slot together, creating 16 values)