dLogitNorm: density for logit transformed univariate Gaussian

Description Usage Arguments Value Examples

View source: R/plotting_functions.R

Description

density for logit transformed univariate Gaussian

Usage

1
dLogitNorm(x, mu, sigma)

Arguments

x,

numeric real

mu,

numeric real

sigma,

numeric real positive

Value

tranformed density on support (0, 1)

Examples

1
2
3
4
5
6
mu <- -1
sigma <- 1
z <- rnorm(10000, mu, sigma)
hist(exp(z)/(1 + exp(z)), freq = FALSE)
curve(dLogitNorm(x, mu = mu, sigma = sigma), col = 'red', add = TRUE, from = 0.01, to = 0.99)
integrate(function(x) dLogitNorm(x, mu = mu, sigma = sigma), lower = 0, upper = 1) # equals 1

indirect documentation built on May 1, 2019, 6:35 p.m.