Displaying 5 results from an estimated 5 matches for "jff".
Did you mean:
iff
2011 Jun 07
2
Setting up a State Space Model in dlm
...;
!is.na(pilag))
## First attempt
buildNAIRU <- function(x) {
modNAIRU <- dlm(FF=t(matrix(c(1,1,1,0))),
GG=diag(4),
W=matrix(c(0,0,0,0, 0,0,0,0, 0,0,0.04,0, 0,0,0,0),4,4),
V=exp(x[4]), m0=rep(0,4), C0=diag(1e07,4),
JFF = t(matrix(c(1,1,0,0))),
X=cbind( tvnairu.df$pilag, tvnairu.df$u))
return(modNAIRU)
}
(fitNAIRU <- dlmMLE(tvnairu.df$pi, parm=c(0,0,0,0) , build=buildNAIRU,
hessian=TRUE, control=list(maxit=500)))
(dlmNAIRU <- buildNAIRU(fitNAIRU$par))
## Second attempt
buildNAIRU <-...
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 to give
me the array of this matrix
Any help would be really appreciated!
Thanks
--
View this message in c...
2011 Jun 03
0
Package dlm generates unstable results?
...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 mail)
BuildMod <- function(x){
return(dlm(
m0 = x[1],
C0 = x[2],
FF = 1,
GG = 1,
V = x[3],
W = x[4],
JFF = 1,
X = X
))
}
ModFit <- dlmMLE(Y,rep(1,4),BuildMod,debug=T)
dlmMod <- BuildMod(ModFit$par)
V <- dlmMod$V
W <- dlmMod$W
ModFilt <- dlmFilter(Y,dlmMod)
v <- tail(dlmSvd2var(ModFilt$U.C,ModFilt$D.C),1)
m <- tail(ModFilt$m,1)
The results are:
V = 5.945003e-05
W = 0.000...
2011 Jun 03
0
How to reconcile Kalman filter result (by package dlm) with linear regression?
...a lot.
Wei
nTotal = nMatrix + 1
BuildMod <- function(x){
L1 = matrix(0,nFactor,nFactor)
L1[upper.tri(L1,T)] <- x[1:nMatrix]
return(dlm(
m0 = rep(0,nFactor),
C0 = diag(nFactor)*10,
FF = matrix(1,1,nFactor),
GG = diag(nFactor),
V = tail(x,1)^2,
W = crossprod(L1),
JFF = matrix(1:4,nr=1),
X = X
))
}
ModFit <- dlmMLE(Y,rep(0.1,nTotal),BuildMod,debug=T)
dlmMod <- BuildMod(ModFit$par)
V = dlmMod$V
W = dlmMod$W
m0 = dlmMod$m0
C0 = dlmMod$C0
ModFilt <- dlmFilter(Y,dlmMod)
v <- tail(dlmSvd2var(ModFilt$U.C,ModFilt$D.C),1)
m <- tail(ModFilt$m,1)...
2008 Aug 09
2
xy plot in version 2.7.1 for Mac (PR#12520)
...vYmoKPDwgL1R5cGUgL0Nh
dGFsb2cgL1BhZ2VzIDMgMCBSIC9WZXJzaW9uIC8xLjQgPj4KZW5kb2JqCjMwIDAgb2JqCjw8IC9M
ZW5ndGggMzEgMCBSIC9MZW5ndGgxIDY5ODggL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4Kc3RyZWFt
CngBhVgNfFTFtT8zc/fuR3azmwD5Jns3S1bJJgSCGBLSZPOxARoxAYJmKZGEEAkoEg0gtohLFdFF
AXmWCm1Fa1tpferNh7ggfaSCtEURay22qIAUq/ZXCvZXtVbJff+5G6jp89d3Z//nnDlz5uvMmdk7
lxgROSlKgkIdy9u7yUbboHkFyOhYvVLb3v36ashnidSJN3YvWd7yxEfVRNbRRJbfLLn5jhu3Pv7s
fjTwARHf2tXZvvjjl8Y+RORegzpXd0GRutx5D/I68uO6lq9c4yDmRv4N5G03r+hoZzPoauTfRl5d
3r6mW4k6v4M8+iPtlvblnWfGLFhE5FFkvntFz0rjXtqO/DjkA923dXbPGTr0IfLXEDkM6BiSfJyk
AkRrpMayjzKBLMuTlKkEKIPIeB/AmI33h5YaH8hyyf...