How Do I Do General Density Estimation with Stan

I am aware of a few density estimation methods. I think that this paper is a good reference Density estimation in R

In the past I have used average shifted histogram and KernSmooth for density estimation. I am curious what methods are are good fit for Stan? How do Stan users estimate non-parametric densities.

What’s the dimensionality of the density that you want to estimate? Edit: i.e. of the space over which you want a density estimate.

Just a one dimensional vector. Like a 0 inflated poisson like distribution.

Bayesian density estimation, or more generally Bayesian nonparametrics, typically involves priors on distributional spaces (Dirichlet processes or in some cases gaussian processes). I would check out Ch 23 of BDA. I personally do not have any experience with implementing them in Stan – my brief impression is that it will probably be difficult to do a ‘true’ Dirchlet process with HMC sampling.

Another thought I had. Couldn’t I just fit a spline to the CDF?

I thought GP was for multivariate distributions. Can it be for a single variable?

How do you want to define density over the discrete space?

sorry. that was a bad example.