Learn R Programming

mvrtn (version 1.0)

mvtn: Mean and Variance of Truncated Normal Distribution

Description

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

Usage

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

Value

a list with two components:
mean
mean of the distribution
variance
variance of the 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.

References

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

See Also

rtn

Examples

Run this code
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)

Run the code above in your browser using DataLab