View source: R/truncated_normal.R
moments_truncnorm_vec | R Documentation |
Compute the mean and variance of one dimensional truncated normal random variable
moments_truncnorm_vec(mu, std, a, b, tol = 1e-06, mean_only = FALSE)
mu |
Mean vector of the normal distribution |
std |
Standard deviation vector of the normal distribution |
a |
Left endpoint vector of the truncated interval |
b |
Right endpoint vector of the truncated interval |
tol |
Computation is only conducted if the truncated normal probability is larger than |
mean_only |
Only compute the truncated normal variance when 'mean_only=FALSE' |
A list containing
mean
The truncated normal mean with the same length of 'mu'
var
The truncated normal varaince with the same length of 'mu' or 'NULL'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.