[R] smoothing function for proportions
Rose Hoberman
roseh at cs.cmu.edu
Fri Aug 10 17:18:38 CEST 2007
I am looking for a function that can fit a smooth function to a vector
of estimated proportions, such that the smoothed value is within
specified confidence bounds of each proportion. In other words, given
a small number of trials and large confidence intervals, I would
prefer the function to vary smoothly, but given a large number of
trials and small confidence intervals, I would prefer the function to
lie within the confidence intervals, even if it is not smooth.
I have attached a postscript file illustrating a data set I would like
to smooth. As the figure shows, for large values of x, I have few
data points, and so the ML estimate of the proportion varies widely,
and the confidence intervals are very large. When I use the
smooth.spline function with a large value of spar (the red line), the
function is not as smooth as desired for large values of x. When I
use a smaller value of spar (the green line), the function fails to
stay within the confidence bounds of the proportions. Is there a
smoothing function for which I can specify upper and lower limits for
the y value for specific values of x?
Thanks for any suggestions,
Rose
More information about the R-help
mailing list