I'm struggling to conduct a post hoc test on a GLM that I run. I have one significant difference but keep getting an error when trying to conduct a TukeyHSD. Can anyone explain to me why this is and how I can correct it? I am a novice in R... Thanks!
Call:
glm(formula = cbind(sampling_unit) ~ +species_count_rain + species_count_dry +
dist_riv + dist_stream, data = GLM1)
Deviance Residuals:
Min 1Q Median 3Q Max
-15.7321 -3.8064 -0.8604 4.3677 18.3710
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -4.035778 6.108781 -0.661 0.5149
species_count_rain 0.101275 0.732416 0.138 0.8911
species_count_dry 2.551763 1.003939 2.542 0.0176 *
dist_riv 0.002783 0.001488 1.871 0.0732 .
dist_stream 0.012681 0.006426 1.974 0.0596 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 55.80858)
Null deviance: 2247.5 on 29 degrees of freedom
Residual deviance: 1395.2 on 25 degrees of freedom
AIC: 212.32
Number of Fisher Scoring iterations: 2
> plot(lrfit)
Hit to see next plot:
Hit to see next plot:
Hit to see next plot:
Hit to see next plot:
> TukeyHSD(GLM1, species_count_dry, ordered = FALSE, confint.level = 0.95)
Error in UseMethod("TukeyHSD") :
no applicable method for 'TukeyHSD' applied to an object of class "data.frame"