powered by

This function computes the variance of a normal distributions that has been truncated at one or both ends.

truncate_var(a = -Inf, b = Inf, mean = 0, sd = 1)

Quantile (i.e., cut score) below which scores should be censored from the distribution.

Quantile (i.e., cut score) above which scores should be censored from the distribution.

Scalar mean or vector of means.

Scalar standard deviation or vector of standard deviations.

A vector of truncated variances

# NOT RUN { truncate_var(a = -1, b = 3, mean = 0, sd = 1) truncate_var(a = 1, b = Inf, mean = 0, sd = 1) truncate_var(a = c(-1, 1), b = c(3, Inf), mean = 0, sd = 1) # }

Run the code above in your browser using DataLab