Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 11, 2024
1 parent 6416b05 commit c4a33df
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
27 changes: 17 additions & 10 deletions R/get_variances.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,23 @@
#' @section Distribution-specific (observation level) variance:
#' The distribution-specific variance,
#' \ifelse{html}{\out{&sigma;<sup>2</sup><sub>d</sub>}}{\eqn{\sigma^2_d}},
#' is the conditional variance the response given the predictors , `Var[y|x]`,
#' which depends on the model family. For Gaussian models, it is
#' \ifelse{html}{\out{&sigma;<sup>2</sup>}}{\eqn{\sigma^2}} (i.e. `sigma(model)^2`).
#' 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. 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. The expected
#' variance of a zero-inflated model is computed according to _Zuur et al. 2012, p277_.
#' is the conditional variance of the response given the predictors , `Var[y|x]`,
#' 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.
#' - **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.
#' - **Zero-inflation models:** The expected variance of a zero-inflated model
#' is computed according to _Zuur et al. 2012, p277_.
#'
#' @section Variance for the additive overdispersion term:
#' The variance for the additive overdispersion term,
Expand Down
27 changes: 18 additions & 9 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 c4a33df

Please sign in to comment.