main effects and pairwise comparisons from occu model

24 views
Skip to first unread message

Harrison Goldspiel

unread,
Mar 28, 2026, 5:44:32 PM (10 days ago) Mar 28
to unmarked
Hi there,

I'm trying to figure out how to get main effects and corrected pairwise comparisons from an occupancy model with a categorical predictor with three categories. 

My model has this basic structure:
occu(~method + date ~1, data = umf)

date is continuous day of year (DOY)

Basically, I'm looking for something akin to what car::Anova(model) would give you for the main effect of the categorical predictor (method) and something similar to what you can obtain from TukeyHDS/emmeans/cld for the pairwise comparisons. It doesn't seem like these functions/packages support unmarked models.

I've seen a few posts in this group about pairwise comparisons and I've seen other manuscripts that refit models with different references for categorical predictors to evaluate other comparisons, but I'm not sure how to adjust for multiple comparisons. I know I can manually estimate a critical value for multiple comparisons, but I'm not sure what exactly the degrees of freedom is for the model. Is it the number of sites - K? The number of (sites * occasions) - K?

Thanks for your help,
Harrison

Jim Baldwin

unread,
Mar 28, 2026, 6:11:53 PM (10 days ago) Mar 28
to unma...@googlegroups.com
For the "main effect" part of your question, does using

occu(~ 0 + method + date ~1, data=umf)

or

occu(~ -1 + method + date ~1, data=umf)

get you the estimates for each method?

Jim





--
*** Three hierarchical modeling email lists ***
(1) unmarked (this list): for questions specific to the R package unmarked
(2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
(3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
---
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/unmarked/07ab633a-1fe3-4924-87f7-9cbc460ada2cn%40googlegroups.com.

Harrison Goldspiel

unread,
Mar 28, 2026, 8:33:16 PM (10 days ago) Mar 28
to unmarked
Hi Jim,

That gets me the means parameterization, which is not quite what I mean by main effects. I mean whether there is an overall difference in detection across the levels of the categorical variable as opposed to the "simple effects" which are how each detection differs for each level of method from the reference level, as reported by summary(model).

For example:
mod <- lm(Sepal.Length ~ Species, data = iris)
car::Anova(mod)

Harrison
Reply all
Reply to author
Forward
0 new messages