Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

. The data set \"alligator_foodchoice.txt\" shows the primary food type (in volu

ID: 3368925 • Letter: #

Question

. The data set "alligator_foodchoice.txt" shows the primary food type (in volume) found in the alligator’s stomach. Primary food type has two categories: Fish and Invertebrate. The alligator length varies between 1.24 and 3.89 meters. Let Y=primary food choice and X=alligator length. Answer the following questions: Use software to fit a logistic regression model with continuous predictor X. Interpret the estimated coefficients in the model. (15 points)

R Output below

reg-glmCgator[E,21 gator[,1], family-binomial(link-"logit)) summaryCreg) Call : glm(formula gator[, 2] ~ gator[, 1], family binomial(link "logit")) Deviance Residuals: Min 1QMedian 3Q Max 2.1041 -0.9544 0.25210.7984 1.6054 Coefficients: Estimate Std. Error z value Pr(>lzl (Intercept) -3.8550 1] 2.1886 1.3254-2.909 0.00363 ** 0.7043 3.108 0.00189 ** gatorL, Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1''1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 78.903 on 58 degrees of freedom Residual deviance: 61.721 on 57 degrees of freedom AIC: 65. 721

Explanation / Answer

I am very glad that you solve the more challenging part of the problem. Your code for logistic regression is right.

Now you have to interpret your estimated coefficients.

If we test that the equality of the coefficients with zero then at level of significance 0.05 and 0.01 we reject the null hypothesis. Because from the P-value of the table both the P-value for intercept and variable are less than 0.05 and 0.01. Therefore for both level of signifance alternative is true. Hence our model is perfect.