Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representation for an ARMA(1, 1) state process #159

Open
ashaffer opened this issue Feb 7, 2022 · 0 comments
Open

Representation for an ARMA(1, 1) state process #159

ashaffer opened this issue Feb 7, 2022 · 0 comments

Comments

@ashaffer
Copy link

ashaffer commented Feb 7, 2022

I'm trying to figure out how to represent an ARMA(1,1) state process, and I think I have a way of doing it that should work in principle, but it's erroring out with this error:

https://github.com/atsa-es/MARSS/blob/master/R/utility_functions.R#L243

The method I was trying to use to represent the model is:

iter = 1
control = list(maxit=iter, minit=iter, trace = 1, safe = 1)
model <- list(
    B = matrix(c(0.4, 0, 0.2, 0), nrow=2),
    G = matrix(c(1, 1, 0, 0), nrow=2),
    Q = matrix(c('q1', 0, 0, 0), nrow=2),
    A = matrix(c(0), 1),
    Z = matrix(c(1, 0), 1, 2),
    R = matrix(c(1)),
    V0 = matrix(c(1, 0, 0, 0), 2),
    L = matrix(c(1, 1, 0, 0), 2),
    U = matrix(c(0, 0), 2, 1),
    x0 = matrix(c(0, 0), nrow=2),
    tinitx = 0
)

fit.0 <- MARSS(y, model = model, control=control, fun.kf="MARSSkfss")

The idea being to use the G matrix to copy the error term into the second state component, and then use it in the next cycle. Is there another way to represent this concept, or is it just not representable?

EDIT: Also, my understanding from the derivation paper is that I should be able to make Q 1x1 in this circumstance, and allow G to expand it to 2x2, but the library doesn't seem to like that. Is that intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant