Daily time series with zeros
- Dominant language
- R
- Stars
- 1.9k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
I have an issue that I'm having trouble debugging, I'm not convinced its a bug, but thought that I should post it here anyway. I have a fair number (10+) of daily time series that I'm using as control series. Some of the time-series contain 0 entries when daily. When I run the model using daily time series I get the following error message:
```
> impact <- CausalImpact(
+ final_series,
+ pre.period = first_last(pre_index),
+ post.period = first_last(post_index),
+ model.args = list(nseasons = 7),
+ alpha = .2
+ )
Error in data.frame(y.model, cum.y.model, point.pred, cum.pred) :
arguments imply differing number of rows: 979, 1459
```
I've tried dropping out control time series one by one without luck.
When I convert the same time series to weekly, most (but not all) of the zero entries are removed and the model runs without any problems.
I'm at a bit of a loss as to why this error is occurring. I'm using the latest version of the package.
```
> packageVersion("CausalImpact")
[1] ‘1.2.1’
```
Contributor guide
Assessment
This issue has not been assessed yet.