mvtn: Mean and Variance of Truncated Normal Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/mvtn.R

Description

Computes the mean and variance in a univariate censored normal distribution with parameters zmu and zsig and censor point c.

Usage

1
mvtn(zmu, zsig, c, side = c("left", "right"))

Arguments

zmu

Mean Paramter

zsig

Standard Deviation Paramter

c

Censor Point

side

Left or right truncation of normal distribution

Details

The derivation of the method used is described in the vignette that accompanies this package (Mohammad, McLeod, and McLeod, 2014). See documentation for the accompanying function rtn() for empirical validation.

Value

a list with two components:

mean

mean of the distribution

variance

variance of the distribution

Author(s)

Matthew McLeod

References

N. Mohammad, M. McLeod and I. McLeod, Mean and Variance of the Truncated Normal Distribution. Vignette for mvtn package.

See Also

rtn

Examples

1
2
3
4
5
6
7
8
9
mvtn(100,15,80,"left")
mvtn(100,15,80,"right")
#simulation check on the answer
## Not run: 
#Simulate truncated left truncated normal and compute
#  empirical means and variances and their sds


## End(Not run)

Example output

[1] 102.7071 163.5305
[1] 73.02798 36.95043

mvrtn documentation built on May 2, 2019, 1:27 p.m.

Related to mvtn in mvrtn...