Skip to content

Commit 16761c7

Browse files
committed
Fix shape of AR params
1 parent 9c14472 commit 16761c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(
9898
)
9999

100100
def populate_component_properties(self):
101-
k_states = self.k_states // self.k_endog
101+
k_states = self.k_states // self.k_endog # this is also the number of AR lags
102102

103103
self.state_names = [
104104
f"L{i + 1}[{state_name}]"
@@ -122,7 +122,7 @@ def populate_component_properties(self):
122122

123123
self.param_info = {
124124
f"params_{self.name}": {
125-
"shape": (self.k_states,) if self.k_endog == 1 else (self.k_endog, self.k_states),
125+
"shape": (k_states,) if self.k_endog == 1 else (self.k_endog, k_states),
126126
"constraints": None,
127127
"dims": (AR_PARAM_DIM,)
128128
if self.k_endog == 1

0 commit comments

Comments
 (0)