KalmanForecast (stats)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

KalmanForecast (stats)

Csima Gabriella

Dear List members,

I would like to use the Kalman-filter program for forecasting - namely for postprocessing numerical model results of 2m temperature. I have looked through the help of the Kalman-filtering programs, mainly the KalmanForecast and I have read about the newer packages like KFAS as well.

I always uderstand and use new R programs that first I try out the example(s), it makes me a base for my new program. My problem is that there is no any example (with data that I can run immediately), and I do not understand, or cannot imagine how - e.g. the "mod" - have to be as the input of the program.

Could you send me a simple example of KalmanForecast (with input data) that I can run and can see how it works exactly?

Cheers,
Gabriella



        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: KalmanForecast (stats)

Giovanni Petris

Gabriella,

There is no function "KalmanForecast" in package stats, so I am not quite sure about what you are talking about. That said, it may help a review paper that I wrote a couple of years ago about the different packages available in R for state space modeling (Petris & Petrone, State space models in R, Journal of Statistical Software 41, 2011). Another good review paper is Tusell, Kalman filtering in R, JSS 39, 2011.

Hope this helps you to get started.

Best,
Giovanni

________________________________________
From: [hidden email] [[hidden email]] on behalf of Csima Gabriella [[hidden email]]
Sent: Friday, June 28, 2013 6:27 AM
To: [hidden email]
Subject: [R] KalmanForecast (stats)

Dear List members,

I would like to use the Kalman-filter program for forecasting - namely for postprocessing numerical model results of 2m temperature. I have looked through the help of the Kalman-filtering programs, mainly the KalmanForecast and I have read about the newer packages like KFAS as well.

I always uderstand and use new R programs that first I try out the example(s), it makes me a base for my new program. My problem is that there is no any example (with data that I can run immediately), and I do not understand, or cannot imagine how - e.g. the "mod" - have to be as the input of the program.

Could you send me a simple example of KalmanForecast (with input data) that I can run and can see how it works exactly?

Cheers,
Gabriella



        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: KalmanForecast (stats)

Giovanni Petris
In reply to this post by Csima Gabriella

Oops...

Correction: The function KalmanForecast does exist in package stats.

The references that I gave in my other reply are still valid, though. It is my impression that Kalman filtering facilities in stats are not meant to be used directly by the end user of R, but their main purpose is to serve as workhorses for other model fitting and forecasting functions (e.g., StructTS).

Best,
Giovanni

________________________________________
From: [hidden email] [[hidden email]] on behalf of Csima Gabriella [[hidden email]]
Sent: Friday, June 28, 2013 6:27 AM
To: [hidden email]
Subject: [R] KalmanForecast (stats)

Dear List members,

I would like to use the Kalman-filter program for forecasting - namely for postprocessing numerical model results of 2m temperature. I have looked through the help of the Kalman-filtering programs, mainly the KalmanForecast and I have read about the newer packages like KFAS as well.

I always uderstand and use new R programs that first I try out the example(s), it makes me a base for my new program. My problem is that there is no any example (with data that I can run immediately), and I do not understand, or cannot imagine how - e.g. the "mod" - have to be as the input of the program.

Could you send me a simple example of KalmanForecast (with input data) that I can run and can see how it works exactly?

Cheers,
Gabriella



        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: KalmanForecast (stats)

Hasan Diwan-2
On 1 July 2013 19:24, Giovanni Petris <[hidden email]> wrote:
> Could you send me a simple example of KalmanForecast (with input data) that I can run and can see how it works exactly?

There's an explanation of the Kalman Filter available at
http://www.swarthmore.edu/NatSci/echeeve1/Ref/Kalman/ScalarKalman.html
-- I've summarised it below:
The kalman filter is used to reduce the noise in an indirectly
measured signal, s, approximated by the formula -- x[t] = a*x[t-1] +
b*u[t], to which a random amount of white noise is added, making the
equation x[t] = a*x[t-1]+b*u[t] + w[t]. The white noise varies with
time, hence it's a series. Each measure of x[t] brings you closer to
the actual signal. I hope this helps... -- H
--
Sent from my mobile device
Envoyé de mon portable

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: KalmanForecast (stats)

Bert Gunter
In reply to this post by Giovanni Petris
Below...

On Mon, Jul 1, 2013 at 7:24 PM, Giovanni Petris <[hidden email]> wrote:
>
> Oops...
>
> Correction: The function KalmanForecast does exist in package stats.
>
> The references that I gave in my other reply are still valid, though. It is my impression that Kalman filtering facilities in stats are not meant to be used directly by the end user of R,

... and on what, pray tell, do you base **that**  strange pronouncement??

-- Bert




but their main purpose is to serve as workhorses for other model
fitting and forecasting functions (e.g., StructTS).

>
> Best,
> Giovanni
>
> ________________________________________
> From: [hidden email] [[hidden email]] on behalf of Csima Gabriella [[hidden email]]
> Sent: Friday, June 28, 2013 6:27 AM
> To: [hidden email]
> Subject: [R] KalmanForecast (stats)
>
> Dear List members,
>
> I would like to use the Kalman-filter program for forecasting - namely for postprocessing numerical model results of 2m temperature. I have looked through the help of the Kalman-filtering programs, mainly the KalmanForecast and I have read about the newer packages like KFAS as well.
>
> I always uderstand and use new R programs that first I try out the example(s), it makes me a base for my new program. My problem is that there is no any example (with data that I can run immediately), and I do not understand, or cannot imagine how - e.g. the "mod" - have to be as the input of the program.
>
> Could you send me a simple example of KalmanForecast (with input data) that I can run and can see how it works exactly?
>
> Cheers,
> Gabriella
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



--

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: KalmanForecast (stats)

Giovanni Petris

If you read the 'Warning' section of the help page for KalmanLike, it explicitely says that

begin quote

     These functions are designed to be called from other functions
     which check the validity of the arguments passed, so very little
     checking is done.

end quote

So, (1) these functions are not intended to be used directly and, (2) writing other functions to call them after checking the validity of the arguments is _probably_ not something the typical/average R end user would be comfortable with. Of course, (2) just reflects my perception of the larger R users community.

Best,
Giovanni
 
________________________________________
From: Bert Gunter [[hidden email]]
Sent: Monday, July 01, 2013 10:25 PM
To: Giovanni Petris
Cc: Csima Gabriella; [hidden email]
Subject: Re: [R] KalmanForecast (stats)

Below...

On Mon, Jul 1, 2013 at 7:24 PM, Giovanni Petris <[hidden email]> wrote:
>
> Oops...
>
> Correction: The function KalmanForecast does exist in package stats.
>
> The references that I gave in my other reply are still valid, though. It is my impression that Kalman filtering facilities in stats are not meant to be used directly by the end user of R,

... and on what, pray tell, do you base **that**  strange pronouncement??

-- Bert




but their main purpose is to serve as workhorses for other model
fitting and forecasting functions (e.g., StructTS).

>
> Best,
> Giovanni
>
> ________________________________________
> From: [hidden email] [[hidden email]] on behalf of Csima Gabriella [[hidden email]]
> Sent: Friday, June 28, 2013 6:27 AM
> To: [hidden email]
> Subject: [R] KalmanForecast (stats)
>
> Dear List members,
>
> I would like to use the Kalman-filter program for forecasting - namely for postprocessing numerical model results of 2m temperature. I have looked through the help of the Kalman-filtering programs, mainly the KalmanForecast and I have read about the newer packages like KFAS as well.
>
> I always uderstand and use new R programs that first I try out the example(s), it makes me a base for my new program. My problem is that there is no any example (with data that I can run immediately), and I do not understand, or cannot imagine how - e.g. the "mod" - have to be as the input of the program.
>
> Could you send me a simple example of KalmanForecast (with input data) that I can run and can see how it works exactly?
>
> Cheers,
> Gabriella
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



--

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.