Estimates Moments for a Truncated Normal Distribution using 'Stan'

Finds the posterior modes for the mean and standard deviation for a truncated normal distribution with one or two known truncation points. The method used extends Bayesian methods for parameter estimation for a singly truncated normal distribution under the Jeffreys prior (see Zhou X, Giacometti R, Fabozzi FJ, Tucker AH (2014). "Bayesian estimation of truncated data with applications to operational risk measurement". ). This package additionally allows for a doubly truncated normal distribution.


truncnormbayes

truncnormbayes provides functionality to estimate mean and standard deviation for a truncated normal distribution.

Specifically, this package finds the posterior modes for the mean and standard deviation for a truncated normal distribution with one or two known truncation points. The method used extends Bayesian methods for parameter estimation for a singly truncated normal distribution under the Jeffreys prior [see Zhou, X., Giacometti, R., Fabozzi, F. J., & Tucker, A. H. (2014). Bayesian estimation of truncated data with applications to operational risk measurement. Quantitative Finance, 14(5), 863-888. DOI 10.1080/14697688.2012.752103]. This package additionally allows for a doubly truncated normal distribution.

Installation

You can install the development version of truncnormbayes from GitHub with:

# install.packages("devtools")
devtools::install_github("leonkt/truncnormbayes")

Example

library(truncnormbayes)

# generate data from a truncated normal
x <- truncnorm::rtruncnorm(100, a = -1, b = 2, mean = 0.5, sd = 0.5)

# estimate its paramaeters
trunc_est(x, a = -1, b = 2)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("truncnormbayes")

0.0.3 by Peter Solymos, 3 years ago


https://github.com/mathurlabstanford/truncnormbayes, https://mathurlabstanford.github.io/truncnormbayes/


Report a bug at https://github.com/mathurlabstanford/truncnormbayes/issues


Browse source code at https://github.com/cran/truncnormbayes


Authors: Mika Braginsky [aut] , Leon Tran [aut] , Maya Mathur [ctb] , Peter Solymos [cre, ctb]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports methods, Rcpp, RcppParallel, Rdpack, rstan, rstantools, stats

Suggests testthat, truncnorm, withr

Linking to BH, Rcpp, RcppEigen, RcppParallel, rstan, StanHeaders

System requirements: GNU make


See at CRAN