[R] prediction intervals for robust regression

2015-02-11 Thread Burns, Jonathan (NONUS)
I have created robust regression models using least trimmed squares and MM-regression (using the R package robustbase). I am now looking to create prediction intervals for the predicted results. While I have seen some discussion in the literature about confidence intervals on the estimates

Re: [R] prediction intervals for robust regression

2015-02-11 Thread Bert Gunter
Presumably you've checked out: http://cran.r-project.org/web/views/Robust.html If you can estimate the variance of parameter estimates, betahat, then you can estimate the variance of a predicted value, X betahat; add the estimated variance of individuals to this if that's what you're looking for

Re: [R] prediction intervals for robust regression

2015-02-11 Thread Prof Brian Ripley
On 11/02/2015 19:38, Bert Gunter wrote: Presumably you've checked out: http://cran.r-project.org/web/views/Robust.html If you can estimate the variance of parameter estimates, betahat, then you can estimate the variance of a predicted value, X betahat; add the estimated variance of individuals

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

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-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

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

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

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

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

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

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

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

[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

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

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

[R] Prediction Intervals predict.Arima

2014-01-27 Thread monika nov
I would like to ask how exactly the prediction intervals are calculated by function predict.arima in R. I suppose that the method is same as for the function forecast (which I am actually using). Unfortunately I can not find it anywhere. I am particularly interested in how it works for Arima

Re: [R] prediction intervals

2011-06-19 Thread Dave Evens
From: Greg Snow greg.s...@imail.org roject.org Sent: Friday, 17 June 2011, 21:40 Subject: RE: [R] prediction intervals I am not an expert in time series (that is why I referred you to the task view rather than give my own inexpert opinion).  I do remember from

Re: [R] prediction intervals

2011-06-17 Thread Dave Evens
] On Behalf Of Dave Evens Sent: Thursday, June 16, 2011 11:33 AM To: r-help@r-project.org Subject: [R] prediction intervals Dear members, I'm fitting linear model using lm which has numerous auto-regressive terms as well as other explanatory variables. In order to calculate prediction

Re: [R] prediction intervals

2011-06-17 Thread Greg Snow
; r-help@r-project.org Subject: Re: [R] prediction intervals Thank you for your post Greg. Do you have any useful references regarding this variability (papers etc)? Many thanks. Dave From: Greg Snow greg.s...@imail.org To: Dave Evens daveeve...@yahoo.co.uk; r-help@r-project.org r-help@r

[R] prediction intervals

2011-06-16 Thread Dave Evens
Dear members, I'm fitting linear model using lm which has numerous auto-regressive terms as well as other explanatory variables. In order to calculate prediction intervals, i've used a for-loop as the auto-regressive parameters need to be updated each time so that a new forecast and

Re: [R] prediction intervals

2011-06-16 Thread Greg Snow
Evens Sent: Thursday, June 16, 2011 11:33 AM To: r-help@r-project.org Subject: [R] prediction intervals Dear members, I'm fitting linear model using lm which has numerous auto-regressive terms as well as other explanatory variables. In order to calculate prediction intervals, i've

[R] prediction intervals using R

2011-06-15 Thread Dave Evens
Dear members, I'm fitting linear model using lm which has numerous auto-regressive terms as well as other explanatory variables. In order to calculate prediction intervals, i've used a for-loop as the auto-regressive parameters need to be updated each time so that a new forecast and

[R] prediction intervals for (mcgv) gam objects

2010-12-29 Thread Julian
As I understand it,  predict.lm(l ,newdata=nd ,interval=confidence) yields confidence bands for the predicted mean of new observations and lm.predict(l ,newdata=nd ,interval=prediction) yields confidence bands for new observations themselves, given an lm object l.   However with regard to 

[R] Prediction Intervals vs. Confidence Bands

2010-07-27 Thread Matt Stati
When I ask R to compute: predict(data, int = c), following a linear regression, what is it computing exactly? How are these lower and upper prediction limits different than what I would get for confidence limits? Thanks, Matt. [[alternative HTML version deleted]]

[R] Prediction intervals for beta regression

2010-02-04 Thread Wearn, Oliver
Dear all, I am trying to get an estimate of uncertainty surrounding a single predicted value from a beta regression model (this is similar to a logistic glm - in that it involves a link function and linear predictor - but it uses the beta distribution rather than discrete binomial). For

Re: [R] prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)

2009-04-27 Thread Michelle Ensbey
...@comcast.net] Sent: Friday, 24 April 2009 10:24 PM To: Michelle Ensbey Cc: r-help@r-project.org Subject: Re: [R] prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging) In R, the predict family of functions provides that facility

Re: [R] prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)

2009-04-27 Thread David Winsemius
: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, 24 April 2009 10:24 PM To: Michelle Ensbey Cc: r-help@r-project.org Subject: Re: [R] prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging) In R, the predict family

[R] prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)

2009-04-24 Thread Michelle Ensbey
Hi all, I was wondering if there is a function out there, or someone has written code for making confidence intervals around model averaged predictions (y~á+âx). The model average estimates are from the dRedging library? It seems a common thing but I can't seem to find one via the search

Re: [R] prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)

2009-04-24 Thread David Winsemius
In R, the predict family of functions provides that facility. If you want the code it will be in the particular function associated with the model type. ?predict ?predict.glm # the example illustrates creation of prediction curves on the response scale for a specific range of data. #

Re: [R] Prediction intervals for zero inflated Poisson regression

2008-12-17 Thread ONKELINX, Thierry
] Prediction intervals for zero inflated Poisson regression Thierry, Simon had written some code for this but we never got round to fully integrate it into the pscl package. A file pb.R is attached, but as a disclaimer: I haven't looked at this code for a while. It still seems to work

[R] Prediction intervals for zero inflated Poisson regression

2008-12-16 Thread ONKELINX, Thierry
Dear all, I'm using zeroinfl() from the pscl-package for zero inflated Poisson regression. I would like to calculate (aproximate) prediction intervals for the fitted values. The package itself does not provide them. Can this be calculated analyticaly? Or do I have to use bootstrap? What I tried

[R] prediction intervals for random effects in nlme

2008-06-16 Thread Marc Bernard
Dear all, nbsp; This is a relist of my previous question. I noticed that some charactersnbsp;were nbsp;not displayed in the previous version. nbsp; nbsp; Is there a function to calculate thenbsp; prediction intervals for random effects in non-linear mixed models? I found a way to do it for

Re: [R] prediction intervals for random effects in nlme

2008-06-16 Thread Dieter Menne
Marc Bernard bernarduse1 at yahoo.fr writes: Is there a function to calculate thenbsp; prediction intervals for random effects in non-linear mixed models? I found a way to do it for linear mixed models but not for non-linearnbsp;mixed one. Please do not send HTML mail to the list. A

Re: [R] prediction intervals from a mixed-effects models?

2008-04-13 Thread Gregory Warnes
On Apr 13, 2008, at 1:41PM , Dieter Menne wrote: Spencer Graves spencer.graves at pdf.com writes: How can I get prediction intervals from a mixed-effects model? Consider the following example: library(nlme) fm3 - lme(distance ~ age*Sex, data = Orthodont, random = ~ 1) df3.1 -