You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`season.duration`|`season_duration` or `model_args["season.duration"]`|`1` when `nseasons` is set|
44
44
|`prior.level.sd`|`prior_level_sd`| 0.01 |
45
45
|`standardize.data`|`standardize_data`| True |
46
-
|`expected.model.size`|`expected_model_size`| 1 |
46
+
|`expected.model.size`|`expected_model_size`|2 in `CausalImpact`; `ModelOptions` keeps 1 |
47
47
48
48
## Data Format
49
49
@@ -81,13 +81,12 @@ Key differences:
81
81
82
82
## Numerical Equivalence
83
83
84
-
This library verifies ±3% agreement with R CausalImpact on point estimates and cumulative effects across multiple test scenarios. Tests run on every PR.
84
+
This library verifies ±3% agreement with R CausalImpact on point estimates and cumulative effects across multiple test scenarios, including a seasonal fixture. Tests run on every PR.
85
85
86
86
Differences arise from independent RNG implementations (R's `set.seed` vs Rust's `ChaCha8Rng`), not from algorithmic differences.
87
87
88
88
## What Is Not Supported
89
89
90
-
- Seasonal state components (`nseasons`, `season.duration`)
Copy file name to clipboardExpand all lines: docs/migration-from-tfp.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,16 @@ ci = CausalImpact(data, pre_period, post_period, model_args=opts)
74
74
ci = CausalImpact(data, pre_period, post_period, model_args={"niter": 1000})
75
75
```
76
76
77
-
Note: `bsts-causalimpact` does not support seasonal components (`nseasons`) in the current version. If your analysis requires seasonality, you need to handle it via covariates (e.g., Fourier terms).
77
+
`bsts-causalimpact` supports `nseasons` and `season_duration` directly:
78
+
79
+
```python
80
+
ci = CausalImpact(
81
+
data,
82
+
pre_period,
83
+
post_period,
84
+
model_args={"nseasons": 7, "season_duration": 1},
85
+
)
86
+
```
78
87
79
88
### Output Access
80
89
@@ -88,7 +97,6 @@ Note: `bsts-causalimpact` does not support seasonal components (`nseasons`) in t
0 commit comments