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

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

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

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

Re: [R] prediction intervals

2011-06-19 Thread Dave Evens
ariables and the regressor against my response variable. Does someone know how such an ARMA model can be fit? Regards, Dave ____________ From: Greg Snow roject.org> Sent: Friday, 17 June 2011, 21:40 Subject: RE: [R] prediction intervals I am not an expert in

Re: [R] prediction intervals

2011-06-17 Thread Greg Snow
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 To: Dave Evens ; "r-help@r-project.org" Sent: Thursday, 16 June 2011, 21:32

Re: [R] prediction intervals

2011-06-17 Thread Dave Evens
Thank you for your post Greg. Do you have any useful references regarding this variability (papers etc)?   Many thanks. Dave From: Greg Snow To: Dave Evens ; "r-help@r-project.org" Sent: Thursday, 16 June 2011, 21:32 Subject: RE: [R] prediction intervals I don't think that t

Re: [R] prediction intervals

2011-06-16 Thread Greg Snow
] 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 othe

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

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

[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 {m

[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 example:

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
, let me know if I've just missed something. Cheers M -Original Message- From: 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 averag

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
p, let me know if I've just missed something. Cheers M -Original Message- From: 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

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. # creat

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

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

2008-12-17 Thread ONKELINX, Thierry
e: [R] 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 stil

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

2008-12-16 Thread Achim Zeileis
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 (an example is included at the end) but please check. hth, Z On

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

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

2008-06-16 Thread Dieter Menne
Marc Bernard yahoo.fr> writes: > > Is there a function to calculate the  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-linear mixed one. Please do not send HTML mail to the list. A discussion and a caveat by

[R] prediction intervals for random effects in nlme

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

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

2008-04-15 Thread Spencer Graves
Thank you Dieter and Greg for your replies. Reinhold Kliegl suggested Gelman & Hill (2007), which looks like it contains an answer to my question. Thanks again. Spencer Graves Gregory Warnes wrote: > On Apr 13, 2008, at 1:41PM , Dieter Menne wrote: > >> Spencer Graves p

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

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

2008-04-13 Thread Dieter Menne
Spencer Graves 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 <- with(Orthodont, data.frame(age=seq(5, 20, 5), >

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

2008-04-13 Thread Spencer Graves
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 <- with(Orthodont, data.frame(age=seq(5, 20, 5), Subject=rep(Subject[1], 4),