search for: dlmmodpoli

Displaying 8 results from an estimated 8 matches for "dlmmodpoli".

Did you mean: dlmmodpoly
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,
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 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
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
2011 Nov 18
0
Kalman Filter with dlm
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 <- dlmModSeas(52) + dlmModPoly(1, dV=5, dW=10) x2.model <- dlmModSeas(52) + dlmModPoly(1, dV=10,
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
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