Skip to content

Commit aa3a011

Browse files
Tweak state names and shock names
1 parent b2ab6f8 commit aa3a011

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymc_extras/statespace/models/structural/components/seasonality.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,15 +539,15 @@ def populate_component_properties(self):
539539
n_coefs = self.n_coefs
540540

541541
self.state_names = [
542-
f"{f}_{self.name}_{i}[{obs_state_name}]"
542+
f"{f}_{i}_{self.name}[{obs_state_name}]"
543543
for obs_state_name in self.observed_state_names
544544
for i in range(self.n)
545545
for f in ["Cos", "Sin"]
546546
]
547547
# determine which state names correspond to parameters
548548
# all endog variables use same state structure, so we just need
549549
# the first n_coefs state names (which may be less than total if saturated)
550-
param_state_names = [f"{f}_{self.name}_{i}" for i in range(self.n) for f in ["Cos", "Sin"]][
550+
param_state_names = [f"{f}_{i}_{self.name}" for i in range(self.n) for f in ["Cos", "Sin"]][
551551
:n_coefs
552552
]
553553

@@ -580,7 +580,7 @@ def populate_component_properties(self):
580580

581581
if self.innovations:
582582
self.param_names += [f"sigma_{self.name}"]
583-
self.shock_names = [f"{self.name}[{name}]" for name in self.observed_state_names]
583+
self.shock_names = self.state_names.copy()
584584
self.param_info[f"sigma_{self.name}"] = {
585585
"shape": () if k_endog == 1 else (k_endog,),
586586
"constraints": "Positive",

0 commit comments

Comments
 (0)