Skip to content

cannot calculate standard estimate with predict on loess

4 messages · David Winsemius, Saurav Pathak

#
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
#
On May 3, 2012, at 7:10 PM, Saurav Pathak wrote:

            
I don't know what effect the se=TRUE will have in the first call. As  
far as I can tell there is no such argument to loess(). Could it be  
that the extranous argument is have an adverse effect on the effort to  
later use predict (which does have such an argument.)?
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
#
On 05/04/2012 10:39 AM, David Winsemius wrote:
Thanks for your reply.  I tried the following with the same error message:

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

Saurav
#
On May 4, 2012, at 10:52 AM, Saurav Pathak wrote:

            
Time for data.