Dear All,
The ragged array solution has worked, but I needed to add some code
and change some code with respect to the summary fit statistics
described on page 406 of Bayesian Population Analysis Using WinBUGS.
I needed to be specific when summarizing over the ragged array
otherwise JAGS would assume the array was not ragged and wonder where
the missing values were.
For instance, within the j loop, instead of
ik.p[i] <- mean(p[i,])
I would have
ik.p[i]<-mean(p[i,1:visits[i])
in the j loop I add
fiti[i]<-sum(E[i,1:visits[i])
fit.newi<-sum(E.new[i,1:visits[i])
and then outside the loops replace
fit<-sum(E[,])
with
fit<-sum(fiti)
and
fit.new<-sum(E.new[,])
with
fit.new<-sum(fit.newi)
Brian
>
https://groups.google.com/d/msgid/hmecology/fe199eb2-e786-4ccb-a13f-d43be4a4ce5dn%40googlegroups.com<
https://groups.google.com/d/msgid/hmecology/fe199eb2-e786-4ccb-a13f-d43be4a4ce5dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> *** Three hierarchical modeling email lists ***
> (1) unmarked: for questions specific to the R package unmarked
> (2) SCR: for design and Bayesian or non-bayesian analysis of spatial
> capture-recapture
> (3) HMecology (this list): 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
> "hmecology: Hierarchical Modeling in Ecology" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
>
hmecology+...@googlegroups.com<mailto:
hmecology+...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/hmecology/c78e58ea-12dc-4b16-b6ad-778af329dd0dn%40googlegroups.com<
https://groups.google.com/d/msgid/hmecology/c78e58ea-12dc-4b16-b6ad-778af329dd0dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> *** Three hierarchical modeling email lists ***
> (1) unmarked: for questions specific to the R package unmarked
> (2) SCR: for design and Bayesian or non-bayesian analysis of spatial
> capture-recapture
> (3) HMecology (this list): 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 a topic in the
> Google Groups "hmecology: Hierarchical Modeling in Ecology" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/d/topic/hmecology/3fVt2xvLcmw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
>
https://groups.google.com/d/msgid/hmecology/ZR0P278MB0869C8C8BC7A294B4BAEC70CEB9D9%40ZR0P278MB0869.CHEP278.PROD.OUTLOOK.COM.
>