Learn R Programming

lava (version 1.11)

normcdf: Normal distribution

Description

Density (normpdf), distribution function (normcdf), and quantile function (norminv) of the normal distribution for objects of class estimate (see estimate.default) in which case the delta method is applied to obtain the influence function (and hence robust standard errors) of the transformed parameter.

Usage

normcdf(q, mean = 0, sd = 1, ...)

# S3 method for default normcdf(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE, ...)

normpdf(x, mean = 0, sd = 1, ...)

# S3 method for default normpdf(x, mean = 0, sd = 1, log = FALSE, ...)

norminv(p, mean = 0, sd = 1, ...)

# S3 method for default norminv(p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE, ...)

Value

A numeric vector (default method) or an object of class estimate.

Arguments

mean

mean of the normal distribution (numeric or estimate object)

sd

standard deviation of the normal distribution (numeric or estimate object)

...

additional arguments to lower level functions (e.g., labels)

lower.tail

if TRUE (default) probabilities are \(P(X\leq x)\), otherwise \(P(X > x)\)

x, q

vector of quantiles, or an estimate object

log, log.p

if TRUE probabilities/densities are given as \(\log(p)\)

p

vector of probabilities, or an estimate object

Author

Klaus Kähler Holst

Details

Any of the arguments x/q/p, mean and sd may be an estimate object. When more than one of them is an estimate object the objects are first merged (see merge.estimate) and the joint delta method is applied, correctly propagating the dependence between them.

See Also

estimate.default stats::dnorm

Examples

Run this code
e <- estimate(coef = c(a = 1, b = 2), vcov = diag(2) * 0.1)
normcdf(e)
normpdf(e)
norminv(normcdf(e)) # identity

## mean and sd may themselves be estimates
mu <- estimate(coef = c(mu = 0.5), vcov = 0.01)
normcdf(e, mean = mu, sd = 2)

Run the code above in your browser using DataLab