Displaying 20 results from an estimated 200 matches similar to: "Kalman Filter with dlm"
2009 May 10
1
Help with kalman-filterd betas using the dlm package
Hi all R gurus out there,
Im a kind of newbie to kalman-filters after some research I have found that
the dlm package is the easiest to start with. So be patient if some of my
questions are too basic.
I would like to set up a beta estimation between an asset and a market index
using a kalman-filter. Much littarture says it gives superior estimates
compared to OLS estimates. So I would like to
2012 Jan 23
0
problems with dlmBSample of the dlm package
Dear R users,
I am trying to use the dlm package, and in particular the dlmBSample function.
For some reason that I am not able to understand, this function does not work properly and the plot of the result does not make sense, while dlmFilter works perfectly.
I think that my_mod is correct, because the output of my_dlmFilter$mod is fine. Where is my mistake or my misunderstanding?
This is the
2013 Feb 20
1
Tracking time-varying objects with the DLM package (dynamic linear models in R)
Hello all,
I am working with the dlm package, specifcially doing a dlm multivariate Y
linear regression using
dlmModReg and dlmFilter and dlmSmooth...
I have altereted the inputs into dlmModReg to make them time-varying using
JFF, JW etc.
How do I track the results of the time varying system matrices?
For example what I am really interested in is JW - my system variance matrix
for each time
2014 Jan 08
0
Strange behaviour of `dlm` package
Dear R-help!
I have encountered strange behaviour (that is, far-off filtering, smoothing
and forecast distributions under certain conditions) in the `dlm` package by
Giovanni Petris.
Here is an example:
I use the annual hotel bookings time series data, which I model using a
second order polinomial DLM.
First I perform the analysis with the data in logarithmic form and
everything seems to be
2013 Mar 08
0
using dlmModPoly in library dlm
Hi Group,
I'm trying to build a model to predict a product's sale price. I'm
researching the dlm package. Looks like I should use dlmModPoly, dlmMLE,
dlmFilter, dlmSmooth, and finally dlmForecast. I'm looking at the Nile
River example and I have a few questions:
1.
If I only want to predict future sale price based on observed sale
price, I should use a univariate model,
2009 Mar 11
1
Forecasting with dlm
Hi All,
I have a problem trying to forecast using the dlm package, can anyone offer
any advise?
I setup my problem as follows, (following the manual as much as possible)
data for example to run code
CostUSD <- c(27.24031,32.97051, 38.72474, 22.78394, 28.58938, 49.85973,
42.93949, 35.92468)
library(dlm)
buildFun <- function(x) {
dlmModPoly(1, dV = exp(x[1]), dW = exp(x[2]))
}
fit <-
2011 Jul 29
0
dlmSum(...) and non-constant state space models
Hello,
I would be very grateful if somebody more knowledgeable then me could assist
me in the following.
I have two (three actually but for simplicity I will say two) models which I
would like to fit jointly as a state space object. Here are the equations:
(1)
w = a1 + b1*(p) + e1
a1 = a1[t-1] + g1
g1 = g1[t-1] + e2
b1 = b1[t-1] + e3
(2)
d = a2 + b2*(w) + e3
a2 = a2[t-1] + e4
b2 = b2[t-1] + e5
2011 Jun 03
0
How to reconcile Kalman filter result (by package dlm) with linear regression?
Hello All,
I am working with dlm for the purpose of estimating and forecasting with a Kalman filter model. I have succesfully set up the model and started generating results. Of course, I need to somehow be sure that the results make sense. Without any apparent target to compare with, my natural selection is the results by odinary least square. The idea being that if I choose a diffuse prior,
2008 Oct 31
1
Kalman Filter
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 problem is clear but if anyone has already worked on
Kalman filter, it could be great to advise me!
2010 Sep 28
0
Time invariant coefficients in a time varying coefficients model using dlm package
Dear R-users,
I am trying to estimate a state space model of the form
(1) b_t = G * b_t-1 + w_t w_t ~ N(0,W)
(2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V)
(Hamilton 1984: 372)
In particular my estimation in state space form looks like
(3) a3_t = 1 * a3_t-1 + w_t w_t ~ N(0,W)
(4) g_t = (a1, a2) * (1, P_t)' + u_t * a3_t + v_t v_t ~ N(0,V)
where g_t is the
2018 Mar 26
0
"dlm" Package: Calculating State Confidence Intervals
To Whom It May Concern,
I estimated a model with 6 states (3 time-varying Regression parameters and 3 quarterly seasonality trends). The model is saved in the object titled "mod."
Following the example in the documentation and using the commands below, I am attempting to use the function "dlmSvd2var" to implement SVD and calculate the 90% confidence errors for each
2018 Mar 28
0
"dlm" Package: Calculating State Confidence Intervals
To Whom It May Concern,
I estimated a model with 6 states (3 time-varying Regression parameters and 3 quarterly seasonality trends). The model is saved in the object titled "mod."
Following the example in the documentation and using the commands below, I am attempting to use the function "dlmSvd2var" to implement SVD and calculate the 90% confidence errors for each
2007 Nov 28
0
Package dlm version 0.8-1
I uploaded a new version of package dlm to CRAN.
dlm provides functions for maximum likelihood, Kalman filtering and
smoothing, and Bayesian analysis of Gaussian linear state space
models, also known as Dynamic Linear Models.
The most important visible changes from the previous version are the
following.
1) Missing values are now allowed in the observations.
2) Extractor and replacement
2007 Nov 28
0
Package dlm version 0.8-1
I uploaded a new version of package dlm to CRAN.
dlm provides functions for maximum likelihood, Kalman filtering and
smoothing, and Bayesian analysis of Gaussian linear state space
models, also known as Dynamic Linear Models.
The most important visible changes from the previous version are the
following.
1) Missing values are now allowed in the observations.
2) Extractor and replacement
2011 Jun 03
0
Package dlm generates unstable results?
Hi, All,
This is the first time I seriously use this package. However, I am confused that the result is quite unstable. Maybe I wrote something wrong in the code? So could anybody give me some hint? Many thanks.
My test model is really simple.
Y_t = X_t * a_t + noise(V),(no Intercept here)
a_t = a_{t-1} + noise(W)
I first run the following code: (I shall provide data at the end of the
2011 Jun 30
0
Specifying State Space model to decompose structural shocks
Dear all:
Greetings!
I am trying to replicate a simple state space model in R, using the
package 'dlm'. This model has two observation equations and three
state equations. Each observation equation represents structural
shocks based on SVAR for country i, where i=1 to 2. The structural
shocks (S1 and S2) are to be decomposed into common (sv1) and
country-specific (sv2, sv3) shocks. We
2009 Feb 15
0
Kalman Filter - dlm package
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 returns (Kx1)
Theta_t is the state vector (Kx1)
G_t is the identity matrix
My first
2003 Sep 10
0
Multivariate Kalman filter with time-varying coefficients
Hi
Does anyone know of any R code for estimating a *multivariate* state
space model using a Kalman filter where the output matrix H(t) is
time-varying but predictable (i.e. measurable w.r.t information at time
t-1) in the observation equation
y(t) = H(t) z(t) + R w(t)?
[Here y(t) are the observations, z(t) is the state variable, w(t) the
observation error and R R' the observation error
2002 Dec 26
0
Kalman-filtering
I have a problem involving state space models with a multivariate
observation equation. In other words: the kalman filtering routines as
implemented in the package ts cannot be used since it treats the
univariate case only. My question : does a multivariate kalman filtering
procedure for R exist somewhere in the world?
Where could I perhaps expect to find something like that?
Many thanks
M.
2004 Dec 04
0
Kalman Filtering
[This email is either empty or too large to be displayed at this time]