truncnorm_mom: Compute the first and second moment of a truncated normal

View source: R/source_EM.R

truncnorm_momR Documentation

Compute the first and second moment of a truncated normal

Description

Given lower and upper endpoints and the mean and standard deviation of a (non-truncated) normal distribution, compute the first and second moment of the truncated normal distribution. All inputs may be scalars or vectors.

Usage

truncnorm_mom(a, b, mu, sig)

Arguments

a

lower endpoint

b

upper endpoint

mu

expected value of the non-truncated normal distribution

sig

standard deviation of the non-truncated normal distribution

Value

a list containing the first moment m1 and the second moment m2

Examples

truncnorm_mom(-1, 1, 0, 1)


drkowal/rSTAR documentation built on July 5, 2023, 2:18 p.m.