logitNormMean {SUMMER} | R Documentation |
Calculate the mean of a distribution whose logit is Gaussian
Description
Adapted from logitnorm package. Calculates the mean of a distribution whose logit is Gaussian. Each row of muSigmaMat is a mean and standard deviation on the logit scale.
Usage
logitNormMean(muSigmaMat, logisticApprox = FALSE, ...)
Arguments
muSigmaMat |
An n x 2 matrix where each row is |
logisticApprox |
Whether or not to use logistic approximation to speed up computation. See details for more information. |
... |
More arguments, passed to |
Details
If ,
This function calculates
via either numerical integration or by
assuming that Y follows a logistic distribution. Under this approximation, setting
, we approximate
the expectation as:
. The above logistic approximation speeds up the computation, but also sacrifices some accuracy.
Value
A vector of expectations of the specified random variables
Author(s)
John Paige
Examples
mus = c(-5, 0, 5)
sigmas = rep(1, 3)
logitNormMean(cbind(mus, sigmas))
logitNormMean(cbind(mus, sigmas), TRUE)