Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-19 Thread Jan Stanstrup
And just then I realized the problem. nknots need to be length(knots). Otherwise knots are deleted. I am not so sure this works equally well as my original loess fit though. The fit I get with cobs is highly dependent on the "knot step size". At 0.4 for example it seems ok. At 0.3 I get points

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-19 Thread Jan Stanstrup
Sorry. I have updated the code to have include the knot selection (https://github.com/stanstrup/retpred_shiny/blob/master/retdb_admin/make_predictions_CI_tests.R). I am working on the "Good data" at the moment. - Jan. On 08/18/2014 08:14 PM, David Winsemius wrote: > I had that result somet

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-18 Thread David Winsemius
I had that result sometimes when testing as well. You don't offer any code so there's nothing I can do to follow-up. -- David. On Aug 18, 2014, at 4:56 AM, Jan Stanstrup wrote: > The knots are deleted anyway ("Deleting unnecessary knots ..."). It seems to > make no difference. > > > > On 08

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-18 Thread Jan Stanstrup
The knots are deleted anyway ("Deleting unnecessary knots ..."). It seems to make no difference. On 08/14/2014 06:06 PM, David Winsemius wrote: On Aug 14, 2014, at 7:17 AM, Jan Stanstrup wrote: Thank you very much for this snippet! I used it on my data and indeed it does give intervals wh

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-14 Thread David Winsemius
On Aug 14, 2014, at 9:06 AM, David Winsemius wrote: > > On Aug 14, 2014, at 7:17 AM, Jan Stanstrup wrote: > >> Thank you very much for this snippet! >> >> I used it on my data and indeed it does give intervals which appear quite >> realistic (script and data here >> https://github.com/stanst

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-14 Thread David Winsemius
On Aug 14, 2014, at 7:17 AM, Jan Stanstrup wrote: > Thank you very much for this snippet! > > I used it on my data and indeed it does give intervals which appear quite > realistic (script and data here > https://github.com/stanstrup/retpred_shiny/blob/master/retdb_admin/make_predictions_CI_tes

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-14 Thread Jan Stanstrup
Thank you very much for this snippet! I used it on my data and indeed it does give intervals which appear quite realistic (script and data here https://github.com/stanstrup/retpred_shiny/blob/master/retdb_admin/make_predictions_CI_tests.R). I also tried getting the intervals with predict.cobs b

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-13 Thread David Winsemius
On Aug 12, 2014, at 8:40 AM, Bert Gunter wrote: > PI's of what? -- future individual values or mean values? > > I assume quantreg provides quantiles for the latter, not the former. > (See ?predict.lm for a terse explanation of the difference). I probably should have questioned the poster about

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-13 Thread Roger Koenker
To follow up on David's suggestion on this thread, I might add that the demo(predemo) in my quantreg package illustrates a variety of approaches to prediction intervals for quantile regression estimates. Adapting this to monotone nonparametric estimation using rqss() or cobs would be quite st

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-13 Thread Jan Stanstrup
Thanks to all of you for your suggestions and comments. I really appreciate it. Some comments to Dennis' comments: 1) I am not concerned about predicting outside the original range. That would be nonsense anyway considering the physical phenomenon I am modeling. I am, however, concerned that t

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-12 Thread Bert Gunter
PI's of what? -- future individual values or mean values? I assume quantreg provides quantiles for the latter, not the former. (See ?predict.lm for a terse explanation of the difference). Both are obtainable from bootstrapping but the details depend on what you are prepared to assume. Consult refe

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-12 Thread David Winsemius
On Aug 12, 2014, at 12:23 AM, Jan Stanstrup wrote: > Hi, > > I am trying to find a way to estimate prediction intervals (PI) for a > monotonic loess curve using bootstrapping. > > At the moment my approach is to use the boot function from the boot package > to bootstrap my loess model, which

[R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-12 Thread Jan Stanstrup
Hi, I am trying to find a way to estimate prediction intervals (PI) for a monotonic loess curve using bootstrapping. At the moment my approach is to use the boot function from the boot package to bootstrap my loess model, which consist of loess + monoproc from the monoproc package (to force