Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

my_vtruncnorm

Variance of Truncated Normal


Description

Computes the variance of truncated normal distributions with parameters a, b, mean, and sd. Arguments can be scalars, vectors, or matrices. Arguments of shorter length will be recycled according to the usual recycling rules, but a and b must have the same length. Missing values are accepted for all arguments.

Usage

my_vtruncnorm(a, b, mean = 0, sd = 1)

Arguments

a

The lower limit for the support of the truncated normal. Can be -Inf.

b

The upper limit for the support. Can be Inf. a and b must have the same length, and each element of a should be less than or equal to the corresponding element of b.

mean

The mean of the untruncated normal.

sd

The standard deviation of the untruncated normal.

Value

The variance of truncated normal distributions with parameters a, b, mean, and sd. If any of the arguments is a matrix, then a matrix will be returned.

See Also


ashr

Methods for Adaptive Shrinkage, using Empirical Bayes

v2.2-47
GPL (>= 3)
Authors
Matthew Stephens [aut], Peter Carbonetto [aut, cre], Chaoxing Dai [ctb], David Gerard [aut], Mengyin Lu [aut], Lei Sun [aut], Jason Willwerscheid [aut], Nan Xiao [aut], Mazon Zeng [ctb]
Initial release
2020-02-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.