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
Hi I am trying to use customized LocalLinearTrend. I have one observation variable and 12 unobserved states + 1 intercept vector with dimension as 12*1. Here is the code and error.
class LocalLinearTrend(sm.tsa.statespace.MLEModel):
def init(self, endog):
# Model order
k_states = k_posdef = 12
I'm guessing that the problem is that with a diffuse prior, this model is not identified. Any of the 12 level series you have could be substituted for another one. You can probably fix the identification issue by initializing the series as known and equal to zero, e.g.:
You can probably fix the identification issue by initializing the series as known and equal to zero
(Note that I'm not sure that it is advisable to try to estimate 12 different random walk components for a single observable series, but my advice is in case you have some good reason for doing this)
Hi Chad,
Thank you so much for your reply. I will try to initialize it as 0.
The shape of the optimum_cost_sale_quarter_201604 is just a number.
Really appreciate all your help.
Best.
Helen
On Wed, Nov 14, 2018 at 5:52 PM ChadFulton ***@***.***> wrote:
I'm guessing that the problem is that with a diffuse prior, this model is
not identified. Any of the 12 level series you have could be substituted
for another one. You can probably fix the identification issue by
initializing the series as known and equal to zero, e.g.:
super(LocalLinearTrend, self).__init__(
endog, k_states=k_states, k_posdef=k_posdef)self.ssm.initialize_known(np.zeros(k_states), np.zeros((k_states, k_states)))
What is the shape of optimum_cost_sale_quarter_201604.values?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5384 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFZRaa6uka83mWWyvMbrDLsOt2Qr3kVfks5uvJ6SgaJpZM4YdAXj>
.
If optimum_cost_sale_quarter_201604 is just a scalar, then even initializing the states as zero, your model will not be identified, since the 12 random walk components are identical. I can't see what you're trying to get at with this model, so I don't have anything else to suggest.
Hi I am trying to use customized LocalLinearTrend. I have one observation variable and 12 unobserved states + 1 intercept vector with dimension as 12*1. Here is the code and error.
class LocalLinearTrend(sm.tsa.statespace.MLEModel):
def init(self, endog):
# Model order
k_states = k_posdef = 12
mod=LocalLinearTrend(sales_time_201604)
res1=mod.fit()
print (res1.summary())
The text was updated successfully, but these errors were encountered: