[R] LOESS confidence interval

F.Hassan at lse.ac.uk F.Hassan at lse.ac.uk
Tue Mar 6 17:57:26 CET 2012


Dear all,

 

I'm trying to construct confidence intervals for a LOWESS estimation (by not using bootstrapping).

 

I have checked previous posts and other material online and I understand that the main procedure is:

 

my.count<- seq(...)

fit<- loess (y ~ x, data=z)

pred<- pred(fit, my.count, se=TRUE)

 

and then the plotting. 

However, it's not working; as confidence intervals I get meaningless dashed lines with no reference to the underlying loess estimation.

 

I think that my main problem is with the seq command, whose role and function I don't really get.

 

My (x;y) space refer to (income; price) across countries. 

 

A previous thread was mentioning that the variables on the X-axis should be equi-spaced; obviously in my case they are not. Is that the problem? If yes, how can I fix it?

 

Can anyone help?

 

Many thanks,

 

fadi


Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer



More information about the R-help mailing list