Skip to content

Commit

Permalink
https://github.com/easystats/easystatstemplate/issues/9
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 17, 2024
1 parent 26e531b commit 17b7d10
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
13 changes: 8 additions & 5 deletions R/get_variances.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,20 @@
#' which depends on the model family.
#' - **Gaussian:** For Gaussian models, it is
#' \ifelse{html}{\out{&sigma;<sup>2</sup>}}{\eqn{\sigma^2}} (i.e. `sigma(model)^2`).
#' - **Bernoulli:** For models with binary outcome, it is \eqn{\pi^2 / 3} for
#' logit-link, `1` for probit-link, and \eqn{\pi^2 / 6} for cloglog-links.
#' - **Bernoulli:** For models with binary outcome, it is
#' \ifelse{html}{\out{&pi;<sup>2</sup> / 3}}{\eqn{\pi^2 / 3}} for logit-link,
#' `1` for probit-link, and \ifelse{html}{\out{&pi;<sup>2</sup> / 6}}{\eqn{\pi^2 / 6}}
#' for cloglog-links.
#' - **Binomial:** For other binomial models, the distribution-specific variance
#' for Bernoulli models is used, divided by a weighting factor based on the
#' number of trials and successes.
#' - **Gamma:** Models from Gamma-families use \eqn{\mu^2} (as obtained from
#' `family$variance()`).
#' - For all other models, the distribution-specific variance is by default
#' based on lognormal approximation, \eqn{log(1 + var(x) / \mu^2)} (see
#' _Nakagawa et al. 2017_). Other approximation methods can be specified with
#' the `approximation` argument.
#' based on lognormal approximation,
#' \ifelse{html}{\out{log(1 + var(x) / &mu;<sup>2</sup>)}}{\eqn{log(1 + var(x) / \mu^2)}}
#' (see _Nakagawa et al. 2017_). Other approximation methods can be specified
#' with the `approximation` argument.
#' - **Zero-inflation models:** The expected variance of a zero-inflated model
#' is computed according to _Zuur et al. 2012, p277_.
#'
Expand Down
13 changes: 8 additions & 5 deletions man/get_variance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17b7d10

Please sign in to comment.