[R] Bounded Density Estimation
Alexander A. Morgan
amorgan at linus.mitre.org
Fri Dec 8 19:28:08 CET 2000
I have been using R and the locfit package for Unix/Linux for a
little while. However, I have had some trouble, as I am trying to do
density estimation for bounded independent variables. There is some
discussion in the density estimation book by Azzalini, but none in the
book by C Loader (creator of locfit). Also, the variables that I am
working on are bounded on both sides, not just on the left (ie constrained
to be positive). I have tried the following transformation:
log(x-minval) - log(maxval-x) = x' but with no good results.
Is there a way to use variable kernels or bandwidths to address this? As
a test case, I was looking at a square of random points (ie even random
distribution), hoping to get a flat density estimation. As expected, it
drops down at the edges, and precipitously at the corners.
I also tried going into the locfit code to see how I could make kernel
changes, and was sort of daunted by the layers of switch statements and
largely undocumented code. I am still rather perplexed by the role of
'degree' as a locfit argument. It makes sense in a local regression, but
doesn't seem to make sense in a nonparameteric density estimation (only
bandwith and kernel seem approriate). However, degree seems to be related
to the smoothness of the fit, just as in regression.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help