Re: [R] Kalman Filtering?

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Thu 16 Jun 2005 - 10:32:49 EST

Hi, Gabor: Great. Thanks. spencer graves

Gabor Grothendieck wrote:

> A simple workaround would be to call KalmanLike this way:
> 
>   KalmanLike(y, mod[], nit)
> 
> as [] makes a copy.
> 
> On 6/15/05, Spencer Graves <spencer.graves@pdf.com> wrote:
> 

>>Hi, Thomas:
>>
>> Thanks much. I modified the R code for "KalmanLike" as you
>>suggested, and the problem went away.
>>
>> Next question: Should KalmanLike work the way it does without your
>>suggested modification? If not, how do we get your proposal transmitted
>>to the appropriate person so it is appropriately considered for adoption
>>in a future release of R?
>>
>> Best Wishes,
>> Spencer Graves
>>
>>Thomas Lumley wrote:
>>
>>
>>>On Wed, 15 Jun 2005, Spencer Graves wrote:
>>>
>>>
>>>
>>>> 1. The function "KalmanLike" seems to change its inputs AND
>>>>PREVIOUSLY MADE copies of the inputs.
>>>
>>>
>>>The strange thing is that it changes its inputs. It would be expected that
>>>this also changed previously made copies. The copies will just be
>>>references to the same actual object in memory (which is why changing the
>>>inputs is undesirable).
>>>
>>>Looking at the C code, it does change the a, P, and Pnew components of the
>>>model. I'm a little reluctant to mess with this code, but an R-level
>>>work-around should be to replace mod$P with mod$P+0 and so on in the
>>>call to .Call, as this will force copying.
>>>
>>> -thomas
>>>
>>>______________________________________________
>>>R-help@stat.math.ethz.ch mailing list
>>>https://stat.ethz.ch/mailman/listinfo/r-help
>>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>
>>______________________________________________
>>R-help@stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-help
>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>>


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 16 10:36:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:43 EST