Hi all, I am a student and I ma writing my master thesis about oil and gasoline options. In my master thesis I would like to estimate some parameter of the oil market. I base my pricing models according to Schwartz (1997). In order to get those data a I need to run a Kalman filter algorith with mximisation of the likelihodd. I am not that familiar with R. Can any of you suggestment a basic code to run the kalman filter?, so I can use it as a starting point to build up more complex one? Does any of you can suggest me a good book about R? Thank you for your help. Teo -- View this message in context: http://r.789695.n4.nabble.com/Implementing-a-Kalman-filter-in-R-tp4630597.html Sent from the R help mailing list archive at Nabble.com.
R has four "Kalman" functions -- type apropos("Kalman") to see them -- then you can get info about any of them in particular by typing ? funcname or running example(funcname) to see worked examples. Beyond the scope of your question, you also might be interested in this: http://cran.r-project.org/web/packages/schwartz97/index.html Best, Michael On Sat, May 19, 2012 at 9:57 AM, mala10af <mala10af at student.cbs.dk> wrote:> Hi all, > > I am a student and I ma writing my master thesis about oil and gasoline > options. In my master thesis I would like to estimate some parameter of the > oil market. I base my pricing models according to Schwartz (1997). In order > to get those data a I need to run a Kalman filter algorith with mximisation > of the likelihodd. I am not that familiar with R. Can any of you suggestment > a basic code to run the kalman filter?, so I can use it as a starting point > to build up more complex one? Does any of you can suggest me a good book > about R? > > Thank you for your help. > > Teo > > -- > View this message in context: http://r.789695.n4.nabble.com/Implementing-a-Kalman-filter-in-R-tp4630597.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org 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.
Hi Teo: On May 19, 2012, at 6:57 AM, mala10af wrote:> Hi all, > > I am a student and I ma writing my master thesis about oil and gasoline > options. In my master thesis I would like to estimate some parameter of the > oil market. I base my pricing models according to Schwartz (1997). In order > to get those data a I need to run a Kalman filter algorith with mximisation > of the likelihodd. I am not that familiar with R. Can any of you suggestment > a basic code to run the kalman filter?, so I can use it as a starting point > to build up more complex one? Does any of you can suggest me a good book > about R? > > Thank you for your help. > > TeoSee: http://www.jstatsoft.org/v41/i04 and http://www.jstatsoft.org/v39/i02 -Roy \********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center 1352 Lighthouse Avenue Pacific Grove, CA 93950-2097 e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address) voice: (831)-648-9029 fax: (831)-648-8440 www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
In addition to the papers suggested by Roy, if you are interested in a book-length treatment of state space models and Kalman filter in R, I would look at http://www.springer.com/978-0-387-77237-0 And I would carry out the implementation in R using package dlm Just my (biased) 2 cents.... Best, Giovanni On Sat, 2012-05-19 at 08:49 -0700, Roy Mendelssohn wrote:> Hi Teo: > > On May 19, 2012, at 6:57 AM, mala10af wrote: > > > Hi all, > > > > I am a student and I ma writing my master thesis about oil and gasoline > > options. In my master thesis I would like to estimate some parameter of the > > oil market. I base my pricing models according to Schwartz (1997). In order > > to get those data a I need to run a Kalman filter algorith with mximisation > > of the likelihodd. I am not that familiar with R. Can any of you suggestment > > a basic code to run the kalman filter?, so I can use it as a starting point > > to build up more complex one? Does any of you can suggest me a good book > > about R? > > > > Thank you for your help. > > > > Teo > > See: > > http://www.jstatsoft.org/v41/i04 > > and > > http://www.jstatsoft.org/v39/i02 > > -Roy > > > \********************** > "The contents of this message do not reflect any position of the U.S. Government or NOAA." > ********************** > Roy Mendelssohn > Supervisory Operations Research Analyst > NOAA/NMFS > Environmental Research Division > Southwest Fisheries Science Center > 1352 Lighthouse Avenue > Pacific Grove, CA 93950-2097 > > e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address) > voice: (831)-648-9029 > fax: (831)-648-8440 > www: http://www.pfeg.noaa.gov/ > > "Old age and treachery will overcome youth and skill." > "From those who have been given much, much will be expected" > "the arc of the moral universe is long, but it bends toward justice" -MLK Jr. > > ______________________________________________ > R-help at r-project.org 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.