search for: dlmmodreg

Displaying 4 results from an estimated 4 matches for "dlmmodreg".

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 period - I cannot get R...
2011 Jul 29
0
dlmSum(...) and non-constant state space models
...t;- lm(pc[,2]~pc[,4])> > # set up SS models> ssm1 <- function(parm){+ rwdw <- dlmModPoly(order=2, + dV = exp(parm[1]), + dW = exp(parm[2:3]),+ m0 = c(coef(dr)[1],0), + C0 = diag(2)*10)+ slpw <- dlmModReg(X=pc[,3], + addInt = FALSE, + dV = exp(parm[4]), + dW = exp(parm[5]), + m0 = c(coef(dr)[2]), + C0 = diag(1)*10) + w <- rwdw + slpw+ + rwdd <- dlmModPoly(order=1, +...
2009 May 10
1
Help with kalman-filterd betas using the dlm package
...h a stationary model, in other worlds the transition equition either follow a RW or AR(1) model. This is how I think it would be set up; I will have my time-series Y,X, where Y is the response variable this setup should give me a RW process if I have understood the example correctly mydlmModel = dlmModReg(X) + dlmModPoly(order=1) and then run on the dlm model dlmFilter(Y,mydlmModel ) but setting up a AR(1) process is unclear, should I use dlmModPoly or the dlmModARMA to set up the model. And at last but not the least, how do I set up a proper build function to use with dlmMLE to optimize the sta...
2011 Nov 18
0
Kalman Filter with dlm
...train$x1, rep(NA, noofsteps)), x1.model) x2.filter <- dlmFilter(c(train$x2, rep(NA, noofsteps)), x2.model) Now, I am forecasting Y using the predicted X1 and X2 as below pred <- cbind(c(train$x1, x1.filter$f[260:312]),c(train$x2, x2.filter$f[260:312])) Y.model <- dlmModSeas(52) + dlmModReg(pred, dV=0.5, dW=c(10,0.05,0.1)) Y.filter <- dlmFilter(c(train$Y, rep(NA, noofsteps)), Y.model) I have two questions 1) The flu season usually starts in early September and it usually peaks during the last week of December or the first week of January. The following are the stages Stag...