Solved – Density estimation with a truncated distribution

I have some data which is clearly truncated on the left. I wish to fit it with a density estimation that will handle it in some way instead of trying to smooth it down.

What known methods (as usual, in R) can address this?

Sample code:

set.seed(1341) x <- c(runif(30, 0, 0.01), rnorm(100,3)) hist(x, br = 10, freq = F) lines(density(x), col = 3, lwd = 3) 

enter image description here

Thanks 🙂

The logspline package for R has the oldlogspline function which will estimate densities using a mixture of observed and censored data.

Similar Posts:

Rate this post

Leave a Comment