Skip to content

Commit

Permalink
some minor fixes to articles
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdalgarno committed May 1, 2024
1 parent 20b0cc1 commit 349130d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vignettes/articles/methods.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ sAnnual ~ Exponential(1)
for(i in 1:nAnnual) bAnnual[i] ~ Normal(0, sAnnual)
for(i in 1:nAnnual) {
FemaleYearlings[i] ~ Binomial(0.5, Yearlings[i])
FemaleYearlings[i] ~ Binomial(sex_ratio, Yearlings[i])
Cows[i] ~ Binomial(adult_female_proportion, CowsBulls[i])
OtherAdultsFemales[i] ~ Binomial(adult_female_proportion, UnknownAdults[i])
log(eRecruitment[i]) <- b0 + bAnnual[Annual[i]] + bYear * Year[i]
Expand All @@ -222,7 +222,7 @@ for(i in 1:nAnnual) bAnnual[i] ~ Normal(0, sAnnual)
for(i in 1:nAnnual) {
Cows[i] ~ Binomial(adult_female_proportion, CowsBulls[i])
FemaleYearlings[i] <- round(0.5 * Yearlings[i])
FemaleYearlings[i] <- round(sex_ratio * Yearlings[i])
OtherAdultsFemales[i] <- round(adult_female_proportion * UnknownAdults[i])
logit(eRecruitment[i]) <- b0 + bAnnual[Annual[i]] + bYear * Year[i]
AdultsFemales[i] <- max(FemaleYearlings[i] + Cows[i] + OtherAdultsFemales[i], 1)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/articles/priors.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ ggplot(data = df) +
scale_color_discrete("")
```

The Bayesian model with vague priors (default) has annual survival estimates that closely match the Maximum Likelihood estimates, whereas the the Bayesian model with a tighter prior on the year fixed effect standard deviation results in estimates that are pulled in toward the mean.
The Bayesian model with vague priors (default) has annual survival estimates that closely match the Maximum Likelihood estimates, whereas the Bayesian model with a tighter prior on the year fixed effect standard deviation results in estimates that are pulled in toward the mean.
If this behaviour is desirable (i.e., to place less trust in extreme estimates), a model with a year random effect can be fit.

As another example, the user might strongly believe (i.e., based on literature or biological understanding) that the true adult female proportion is 65%.
Expand Down

0 comments on commit 349130d

Please sign in to comment.