Re: [R] Kalman filter for a time series

2017-07-30 Thread Staff
Thanks David, that's the clue I needed. Since x monotonically increases, all I needed to do was: ssModel = SSModel( t ~ SSMtrend(degree=1, Q=matrix(NA)), H=matrix(NA), distribution="gaussian") On Sun, Jul 30, 2017 at 10:11 AM, David Winsemius wrote: > > > On Jul

Re: [R] Kalman filter for a time series

2017-07-30 Thread Staff
Exactly. I'm doing: x=c(1:length(t)) ssModel = SSModel( t~x, distribution="gaussian",H=NA) but it is not plotting the Kalman filter line and not giving any errors. I'm not sure what more the model needs? On Sun, Jul 30, 2017 at 9:17 AM, Roy Mendelssohn - NOAA Federal <

Re: [R] Kalman filter for a time series

2017-07-30 Thread David Winsemius
> On Jul 30, 2017, at 5:10 AM, Spencer Graves > wrote: > > > > On 2017-07-29 11:26 PM, Staff wrote: >> I found an example at >> http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html > > That example is signed by "Ian Kaplan". There's a

Re: [R] Kalman filter for a time series

2017-07-30 Thread Roy Mendelssohn - NOAA Federal
> structSSM Is no longer part of KFAS. All you needed to do was: library(KFAS) ?KFAS and you would have seen that if you went to the index. A structural state space model is now built up from its components, much like in LM. Look at; ?SSModel -Roy > On Jul 29, 2017, at 9:26 PM, Staff

Re: [R] Kalman filter for a time series

2017-07-30 Thread Spencer Graves
On 2017-07-29 11:26 PM, Staff wrote: I found an example at http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html That example is signed by "Ian Kaplan". There's a box at the bottom of the page for you to email him. shown below. But it seems the structSSM function

[R] Kalman filter for a time series

2017-07-30 Thread Staff
I found an example at http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html shown below. But it seems the structSSM function has been removed from KFAS library so it won't run. Does anyone know how to fix the code so that it runs? library(KFAS) library(tseries) library(timeSeries)

[R] Kalman Filter Forecast using 'SSPIR'

2012-12-02 Thread rahul143
Dear R Users, I am new to state-space modeling. I am using SSPIR package for Kalman Filter. I have a data set containing one dependent variable and 7 independent variables with 250 data points. I want to use Kalman Filter for forecast the future values of the

[R] Kalman Filter with dlm

2011-11-18 Thread Pearl
I have built a Kalman Filter model for flu forecasting as shown below. Y - Target Variable X1 - Predictor1 X2 - Predictor2 While forecasting into the future, I will NOT have data for all three variables. So, I am predicting X1 and X2 using two Kalman filters. The code is below x1.model -

[R] Kalman Filter Estimation

2011-06-24 Thread Patrick
Dear R users, I am a new R user and not very experienced in Statistics. I would like to regress a time series variable y on several other time series variables x. I read that the Kalman Filter would provide me with a better fit for my estimation. However, I have no idea how to translate this

Re: [R] Kalman Filter Estimation

2011-06-24 Thread Dennis Murphy
Hi: Here are a couple of places to start: http://www.jstatsoft.org/v39/i02/paper http://stats.stackexchange.com/questions/4296/r-code-for-time-series-forecasting-using-kalman-filter HTH, Dennis On Fri, Jun 24, 2011 at 6:24 AM, Patrick patrick88mau...@gmail.com wrote: Dear R users, I am a

[R] Kalman filter

2010-12-02 Thread Santiago Ramos
I can say is used as filter Kalman thanks Cordialmente, JAVIER SANTIAGO PARRA RAMOS INGENIERO DE SISTEMAS ESP. EN GERENCIA DE SISTEMAS INFORMATICOS CEL: (57) 313 416 71 21 [[alternative HTML version deleted]]

Re: [R] Kalman filter

2010-11-22 Thread David Stoffer
It sounds like you've looked at the DLM, DSE, and SSPIR packages. If not, then certainly check them out. Also, we have code for filtering, smoothing and estimation in our text- go to www.stat.pitt.edu/stoffer/tsa3/ and look at the code for chapter 6. There's not a package for the text, but all

Re: [R] Kalman filter

2010-11-20 Thread Stefano Sofia
Federico, as far as I understand Kalman filter works under gaussian conditions, and for this reason it is not implemented. (I have to admit that I do not know the sspir package) hope this helps, and correct me if I am wrong Best regards Stefano Sofia PhD On 11/17/2010 11:49 AM, feder wrote:

Re: [R] kalman filter in sspir

2010-11-18 Thread Spencer Graves
To learn why sspir does not have a filter function, you need to ask the package maintainer, Claus Dethlefsen c...@rn.dk. My belief is that he, Soren Lundbye-Christensen and Anette Luther Christensen found other outlets for their time since they completed the package and the companion

[R] Kalman filter

2010-11-18 Thread Garten Stuhl
Hello, I have completed my kalman filter problem with more details. The transition- and the measurement equation is given by x[t]=A[t]*x[t-1]+B[t]*epsilon[t] y[t]=C[t]*x[t]+eta[t] A, y, B and C are Matrices. Y[t] is the data input vector with 800 elements (every t has one element)

[R] kalman filter in sspir

2010-11-17 Thread feder
Hi, I used sspir for managing non-gaussian State space models but I observed that for such models only the smoother is gave while the filter is missing. Why? -- View this message in context: http://r.789695.n4.nabble.com/kalman-filter-in-sspir-tp3047486p3047486.html Sent from the R help

Re: [R] Kalman Filter

2010-11-15 Thread Garten Stuhl
Hello, thanks for answer my Question. I prefer use KalmanLike(y, mod, nit = 0, fast=TRUE). For parameter estimating I have a given time series. In these are several components: Season and noise; furthermore it gives a mean reversion process. The season is modelled as a fourierpolynom. From the

Re: [R] Kalman Filter

2010-11-15 Thread John Kerpel
Try the most excellent package dlm written by Giovanni Petris for your all your Kalman filter needs. Also buy the accompanying book - it really integrates the dlm package with the theory behind it. Best, John On Mon, Nov 15, 2010 at 8:39 AM, Garten Stuhl gartenstu...@googlemail.comwrote:

[R] kalman filter

2010-11-14 Thread Garten Stuhl
Hello, I would like use Kalman filter for estimating parameters of a stochastic model. I have developed the state space model but I don’t know the correct way use Kalman filter for parameter estimation. Has anybody experience in work with Kalman filter in R. I don’t know the correct

Re: [R] kalman filter

2010-11-14 Thread gpetris
Hi, There are a few packages that I would suggest to run Kalman filter. Take a look at dlm and KFAS. If you need more help you should be more precise in formulating your problem, providing a small example, as required by the posting guide. Best, Giovanni Petris Quoting Garten Stuhl

[R] Kalman filter

2010-08-13 Thread FMH
Dear All, Could anyone give me a hand to suggest few packages in R to running Kalman prediction and filtration ? Thanks Fir __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Kalman filter

2010-08-13 Thread Ben Bolker
FMH kagba2006 at yahoo.com writes: Dear All, Could anyone give me a hand to suggest few packages in R to running Kalman prediction and filtration ? Teach a person to fish ... install.packages(sos) library(sos) findFn(kalman) ## perhaps this could be added to the posting guide?

Re: [R] Kalman filter

2010-08-13 Thread Bruno Mourato
Take a look on this Packages: - KFTRACK - UKFSST - TRACKIT 2010/8/13 FMH kagba2...@yahoo.com Dear All, Could anyone give me a hand to suggest few packages in R to running Kalman prediction and filtration ? Thanks Fir __

Re: [R] Kalman filter

2010-08-13 Thread Spencer Graves
Other terms for Kalman filtering, prediction and smoothing are state space modeling and dynamic linear models. Consider the following extension of Ben Bolker's suggestion to use the 'sos' package: library(sos) k - ???Kalman ss - findFn('state space') dlm - findFn('dynamic

Re: [R] Kalman Filter

2010-05-31 Thread Johann Hibschman
Greigiano Jose Alves alves...@gmail.com writes: I am working on an article forecasting, which use the dynamic linear model, a model state space. I am wondering all the commands in R, to represent the linear dynamic model and Kalman filter. I am available for any questions. There are a few

Re: [R] Kalman Filter

2010-05-26 Thread Giovanni Petris
To find out what tools are available in R, you can check out the Time Series task view on CRAN: http://cran.r-project.org/web/views/TimeSeries.html My personal preference is for package dlm, but here I am probably biased. [discaimer: the following is a sponsored link] For more information on

[R] Kalman Filter

2010-05-25 Thread Greigiano Jose Alves
Hello My name is greigiano am student of Applied Economics, Department of Rural Economy. I am working on an article forecasting, which use the dynamic linear model, a model state space. I am wondering all the commands in R, to represent the linear dynamic model and Kalman filter. I am available

[R] Kalman Filter - dlm package

2009-02-15 Thread g.amo
Dear all, I am currently trying to use the dlm package for Kalman filtering. My model is very simple: Y_t = F'_t Theta_t + v_t Theta_t = G_t Theta_t-1 + w_t v_t ~ N(0,V_t) = N(0,V) w_t ~ N(0,W_t) = N(0,W) Y_ t is a univariate time series (1x1) F_t is a vector of factor

Re: [R] Kalman Filter

2008-11-03 Thread Giovanni Petris
Date: Fri, 31 Oct 2008 16:39:32 +0100 From: Sandrine LUNVEN [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Importance: Normal Precedence: list Hi, I am studying Kalman Filter and it seems to be difficult for me to apply the filter on a simple ARMA. It is easy to construct the

[R] Kalman Filter

2008-10-31 Thread Sandrine LUNVEN
Hi, I am studying Kalman Filter and it seems to be difficult for me to apply the filter on a simple ARMA. It is easy to construct the state-space model, for instance: dlmModARMA(ar=c(0.4,-0.2),ma=c(0.2,-0.1, sigma2=1) but applying the dlmFilter on it, it doesn't work... I don't know if my

Re: [R] Kalman Filter

2008-03-04 Thread David Stoffer
Vladimir- there are at least 3 packages that will facilitate state space modeling: http://cran.r-project.org/src/contrib/Descriptions/dlm.html DLM , http://cran.r-project.org/src/contrib/Descriptions/dse.html DSE , and http://cran.r-project.org/src/contrib/Descriptions/sspir.html SSPIR . In

[R] Kalman Filter

2008-02-26 Thread Vladimír Šamaj
Hi My name is Vladimir Samaj. I am a student of Univerzity of Zilina. I am trying to implement Kalman Filter into my school work. I have some problems with understanding of R version of Kalman Filter in package stats( functions KalmanLike, KalmanRun, KalmanSmooth,KalmanForecast). 1) Can you tell

Re: [R] Kalman Filter

2008-02-26 Thread Spencer Graves
Have you looked at the 'dlm' package? It has a vignette to help you learn to use it. Also, I've heard that a book about that package is scheduled to appear in the next few months. I have looked at the Kalman functions in the 'stats' package but have not found documentation that

Re: [R] kalman filter random walk

2007-12-05 Thread Giovanni Petris
You may want to look at package dlm. Giovanni Date: Wed, 05 Dec 2007 12:05:00 -0600 From: Alexander Moreno [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Precedence: list Hi, I'm trying to use the kalman filter to estimate the variable drift of a random walk, given that I have a vector

Re: [R] kalman filter estimation

2007-11-15 Thread Prof Brian Ripley
On Thu, 15 Nov 2007, [EMAIL PROTECTED] wrote: Hi, Following convention below: y(t) = Ax(t)+Bu(t)+eps(t) # observation eq x(t) = Cx(t-1)+Du(t)+eta(t) # state eq I modified the following routine (which I copied from: http://www.stat.pitt.edu/stoffer/tsa2/Rcode/Kall.R) to accommodate u(t),

Re: [R] kalman filter estimation

2007-11-15 Thread Paul Gilbert
[EMAIL PROTECTED] wrote: Hi, Following convention below: y(t) = Ax(t)+Bu(t)+eps(t) # observation eq x(t) = Cx(t-1)+Du(t)+eta(t) # state eq I modified the following routine (which I copied from: http://www.stat.pitt.edu/stoffer/tsa2/Rcode/Kall.R) to accommodate u(t), an exogenous

Re: [R] kalman filter estimation

2007-11-15 Thread Paul Gilbert
Giovanni Petris wrote: Kalman filter for general state space models, especially in its naive version, is known for its numerical instability. This is the reason why people developed square root filters, based on Cholesky decomposition of variance matrices. In package dlm the implementation

Re: [R] kalman filter estimation

2007-11-15 Thread Giovanni Petris
You can live with it, but be aware that it is there. My suggestion is to start the optimization from several different initial values and compare maximized values of the likelihood. Simulated annealing may be used to better explore the parameter space. Yes. Are you aware of any

Re: [R] kalman filter estimation

2007-11-15 Thread Giovanni Petris
Kalman filter for general state space models, especially in its naive version, is known for its numerical instability. This is the reason why people developed square root filters, based on Cholesky decomposition of variance matrices. In package dlm the implementation of Kalman filter is based on

[R] kalman filter estimation

2007-11-14 Thread adschai
Hi, Following convention below: y(t) = Ax(t)+Bu(t)+eps(t) # observation eq x(t) = Cx(t-1)+Du(t)+eta(t) # state eq I modified the following routine (which I copied from: http://www.stat.pitt.edu/stoffer/tsa2/Rcode/Kall.R) to accommodate u(t), an exogenous input to the system. for (i in 2:N){