Displaying 1 result from an estimated 1 matches for "sigma_n2".
Did you mean:
sigma_2
2011 Dec 17
0
time-varying parameters kalman filter estimation problem using FKF package
...;- cbind(1, as.vector(data[,2]))
y <- as.matrix(data[,1],nrow = 1, ncol = length(y))
# format Z into an array
Zt <- array(NA,c(1,2,nrow(Z)))
for(i in 1:nrow(Z)) {
Zt[,,i] <- Z[i,]
}
# specify state-space form of the time-varying capm
capm.ss <- function(alpha,beta,sigma_e,sigma_n1,sigma_n2) {
Tt <- diag(1,2)
Zt <- Zt
ct <- matrix(0)
dt <- matrix(0,nrow = 2, ncol = 1)
GGt <- matrix(sigma_e^2)
HHt <- diag(c(sigma_n1^2,sigma_n2^2),2)
a0 <- c(0,0)
P0 <- diag(10^6,2)
return(list(a0 = a0, P0 = P0, ct = ct, dt = dt, Zt = Zt, Tt = Tt, GGt =
GGt, HHt = HHt)...