Download presentation
Presentation is loading. Please wait.
Published byOsborn Burke Modified over 9 years ago
1
Logistic Regression with “Grouped” Data Lobster Survival by Size in a Tethering Experiment Source: E.B. Wilkinson, J.H. Grabowski, G.D. Sherwood, P.O. Yund (2015). "Influence of Predator Identity on the Strength of Predator Avoidance Response in Lobsters," Journal of Experimental Biology and Ecology, Vol. 465, pp. 107-112.
2
Data Description Experiment involved 159 juvenile lobsters in a Saco Bay, Maine Outcome: Whether or not lobster survived predator attack in Tethering Experiment Predictor Variable: Length of Carapace (mm). Lobsters grouped in m = 11 groups of width of 3mm (27 to 57 by 3)
3
Models Data: (Y i,n i ) i=1,…,m Distribution: Binomial at each Size Level (X i ) Link Function: Logit: log( i /(1- i )) is a linear function of Predictor (Size Level) 3 Possible Linear Predictors: log( i /(1- i )) = (Mean is same for all Sizes, No association) log( i /(1- i )) = X i (Linearly related to size) log( i /(1- i )) = Z 1 +…+ m-1 Z m-1 + m Z m Z i = 1 if Size Level i, 0 o.w. This allows for m distinct logits, without a linear trend in size (aka Saturated model)
4
Probability Distribution & Likelihood Function - I
5
Maximum Likelihood Estimation – Model 1
6
Maximum Likelihood Estimation – Model 3
7
Model 2 – R Output glm(formula = lob.y ~ size, family = binomial("logit")) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -7.89597 1.38501 -5.701 1.19e-08 *** size 0.19586 0.03415 5.735 9.77e-09 ***
8
Evaluating the log-likelihood for Different Models
9
Deviance and Likelihood Ratio Tests Deviance: -2*(log Likelihood of Model – log Likelihood of Saturated Model) Degrees of Freedom = # of Parameters in Saturated Model - # in model When comparing a Complete and Reduced Model, take difference between the Deviances (Reduced – Full) Under the null hypothesis, the statistic will be chi-square with degrees of freedom = difference in degrees of freedoms for the 2 Deviances (number of restrictions under null hypothesis) Deviance can be used to test goodness-of-fit of model.
10
Deviance and Likelihood Ratio Tests
11
Pearson Chi-Square Test for Goodness-of-Fit
12
Even though some of the group sample sizes are small, and some Expected cell Counts are below 5, it is clear that Model 2 provides a Good Fit to the data
13
Residuals
15
Computational Approach for ML Estimator
16
Estimated Variance-Covariance for ML Estimator
17
ML Estimate, Variance, Standard Errors > mod2 <- glm(lob.y ~ size, family=binomial("logit")) > summary(mod2) Call: glm(formula = lob.y ~ size, family = binomial("logit")) Deviance Residuals: Min 1Q Median 3Q Max -1.12729 -0.43534 0.04841 0.29938 1.02995 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -7.89597 1.38501 -5.701 1.19e-08 *** size 0.19586 0.03415 5.735 9.77e-09 *** Null deviance: 52.1054 on 10 degrees of freedom Residual deviance: 4.5623 on 9 degrees of freedom AIC: 32.24 logLik(mod2) 'log Lik.' -14.11992 (df=2)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.