[R] cannot calculate standard estimate with predict on loess
David Winsemius
dwinsemius at comcast.net
Fri May 4 17:44:56 CEST 2012
On May 4, 2012, at 10:52 AM, Saurav Pathak wrote:
> On 05/04/2012 10:39 AM, David Winsemius wrote:
>>
>> On May 3, 2012, at 7:10 PM, Saurav Pathak wrote:
>>
>>> 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 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.)?
>
> 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)
>
Time for data.
--
David.
>>>
>>> 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,
>>> Saura
More information about the R-help
mailing list