Heather
Thanks for sending your data offline. I have revised my earlier diagnosis [now deleted] as follows.
Your ‘site’ predictor is a character mask covariate. You provide different masks for each year, and exclude from the first mask two sites not sampled in that year. As a result, when the session-specific site covariate is converted internally from character to factor, factor levels do not match across years, and the beta parameters for the site covariate in the first year do not match those in the second year.
The solution is to apply shareFactorLevels() to the multi-session mask _before_ fitting the model (and there’s really no need for a multi-session mask). Applying this retrospectively, as I suggested earlier, gives the _wrong_ answer because it mismatches sites and coefficients. Your workaround is also wrong for the same reason.
Why is the problem not flagged by secr.fit()? The verify function applied to a multi-session mask does throw a warning and suggest using shareFactorLevels(), but within secr.fit() verify is mistakenly applied only to each separate session-specific mask, and therefore fails to find the inconsistency.
Murray
On Dec 21, 2023, at 10:56 PM, Murray Efford <murray...@gmail.com> wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "secr" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/secrgroup/6WFWDf98Nz4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to secrgroup+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/secrgroup/0b29273c-4751-4abf-bb6c-bfd2c18be8adn%40googlegroups.com.