IQSS / Zelig

A statistical framework that serves as a common interface to a large range of models

Home Page:http://zeligproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sim() error with differenced first-order autoregressive model

nmbrodnax opened this issue · comments

library(Zelig)
library(magrittr)

data(seatshare)
subset <- seatshare[seatshare$country == "UNITED KINGDOM",]

s.out <- zelig(unemp ~ leftseat, data = subset, model = "arima",
               order = c(1,1,0)) %>%
    setx(leftseat = 0.25) %>%
    setx1(leftseat = 0.75) %>%
    sim()

produces

Error in apply(beta, 2, mean) : dim(X) must have a positive length

I was able to reproduce this error with different data and different setx() parameters

(Just for documentation purposes) noting that this seems similar to, but different from #305.

Does this commit resolve the issue: 3b5c71d?

Yes, everything works on my end.