sim() error with differenced first-order autoregressive model
nmbrodnax opened this issue · comments
NaLette Brodnax commented
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
Christopher Gandrud commented
(Just for documentation purposes) noting that this seems similar to, but different from #305.
Christopher Gandrud commented
Does this commit resolve the issue: 3b5c71d?
NaLette Brodnax commented
Yes, everything works on my end.