Displaying 2 results from an estimated 2 matches for "kalmanlike2".
Did you mean:
kalmanlike
2010 Sep 10
0
How to call to R_KalmanLike from outside StructTS
...problems.
I have two versions of the function plus the original one. The first version is the same code as the 'StructTS' function:
StructTS.v1 <- function (x, type = c("level", "trend", "BSM"), init = NULL,
??? fixed = NULL, optim.control = NULL)
{
??? KalmanLike2 <- function(y, mod, nit = 0) {
??????? x <- .Call(R_KalmanLike, y, mod$Z, mod$a, mod$P, mod$T,
??????????? mod$V, mod$h, mod$Pn, as.integer(nit), FALSE, fast = TRUE)
??????? 0.5 * sum(x)/length(y)
??? }
#...
#... above and remaining code is the same as the original code in StructTS
#...
}
R...
2003 Jan 28
2
Error from StructTS
Hi,
I used function StructTS some time ago to fit a structural model to a time
series.
Now with R 1.6.2-1 I repeated the analysis with the same series and I get the
following error:
Error in KalmanLike2(y, Z, -1) : invalid argument type
I tried with other series and I get the same error; I checked the examples in
the documentation and they work fine. I suspect I am missing something
here...
Any hints are welcome
Thank you in advance,
Susana Barbosa