normal: A Normal Distribution

Description Usage Arguments Value Author(s) See Also Examples

Description

Create an object representing a univariate normal distribution.

Usage

1
normal(expectation = 0, lambda, P = 1)

Arguments

expectation

The expectation of the distribution.

lambda

THE NATURAL LOGARITHM OF THE STANDARD DEVIATION OF THE DISTRIBUTION. Thus, if the desired standard deviation is s, the second argument should be \log(s). If the desired variance is v, the second argument should be \log(v)/2. The default is a standard deviation of 1. An alternative to specifying this argument is to specify the precision parameter P.

P

If given, this argument specifies the precision of the distribution, i.e., the inverse of the variance.

Value

A univariate normal probability distribution.

Author(s)

Petter Mostad <mostad@chalmers.se>

See Also

mnormal

Examples

1
2
3
4
5
6
dist <- normal(3, log(0.7))
variance(dist)
dist <- normal(5, log(0.49)/2)
variance(dist)
dist <- normal(7, P = 2)
variance(dist)

Example output

Loading required package: MASS
[1] 0.49
[1] 0.49
[1] 0.5

lestat documentation built on May 2, 2019, 2:09 p.m.