[R] cannot calculate standard estimate with predict on loess

Saurav Pathak saurav at sas.upenn.edu
Fri May 4 01:10:50 CEST 2012


Hi,

For some reason I have been unable to use the predict function when I 
desire the standard error to be calculated too.  For example, when I try 
the following:

l<- loess(d~x+y, span=span, se=TRUE)
p<- predict(l, se=TRUE)


I get the following error message:

Error in vector("double", length) : vector size cannot be NA
In addition: Warning message:
In N * M1 : NAs produced by integer overflow


But when I try the following:

l<- loess(d~x+y, span=span, se=TRUE)
p<- predict(l, se=FALSE)


I have no problem, and p$fit gives me the desired fitted values.  Note 
that the only difference in this piece of code is se=FALSE.

My data d is a vector, and x and y are vectors too of the same length.

Any help will be greatly appreciated.

Thanks,
Saurav



More information about the R-help mailing list