search for: dlmsvd2var

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

2018 Mar 26
0
"dlm" Package: Calculating State Confidence Intervals
...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 time-varying state. outF <- dlmFilter(y,mod) v <- unlist(dlmSvd2var(outF$U.C, outF$D.C)) pl <- dropFirst(outF$m) + qnorm(0.05, sd=sqrt(v[-1])) pu <- dropFirst(outF$m) + qnorm(0.95, sd=sqrt(v[-1])) Since the datase...
2018 Mar 28
0
"dlm" Package: Calculating State Confidence Intervals
...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 time-varying state. outF <- dlmFilter(y,mod) v <- unlist(dlmSvd2var(outF$U.C, outF$D.C)) pl <- dropFirst(outF$m) + qnorm(0.05, sd=sqrt(v[-1])) pu <- dropFirst(outF$m) + qnorm(0.95, sd=sqrt(v[-1])) Since the datase...
2011 Jun 03
0
Package dlm generates unstable results?
...- 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.0003086623 v = 9.850526e-05 (the estimated variance for a_t  after we observe the last pair of observations) m = -0.02965614 (the estimated mean for a_t after we observe the last pair of observations)...
2011 Jun 03
0
How to reconcile Kalman filter result (by package dlm) with linear regression?
...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)   Here is the value of Y: 0.0125678739370109 -0.00241285475528163 0.00386919876129071 -0.00352839097011217 0.00285344714211614 0.00374266510625097 0.00797807743013259 -0.00543459628953192 -0.0138447399853609 -0.0102614592879934 -0.0225111772602...