Hamilton-rpf issue
Re: Hamilton-rpf issue
Dear Sir,
I would like to obtain the best lag order for my Industrial Production (IP)
time series instead if guessing it using hamilton's MS-AR.
I saw that in the original hamilton's 1989 code, we have the output of the linear regression
in the final result as below.
Could it be possible to obtain such figure from your coding of Hamiltion 1989?
That could be great as it coult help me run 12 times YOUR code with different lag order
before looking at the log-likelihood of all the regression and making a choie of the best lag order that has the
highest log-likelihood in absolute value.
*****************************************
Linear Regression - Estimation by Least Squares
Dependent Variable G
Quarterly Data From 1952:02 To 1984:04
Usable Observations 131
Degrees of Freedom 126
Centered R^2 0.1432832
R-Bar^2 0.1160858
Uncentered R^2 0.4128716
Mean of Dependent Variable 0.7198347939
Std Error of Dependent Variable 1.0663818552
Standard Error of Estimate 1.0025771251
Sum of Squared Residuals 126.65027237
Regression F(4,126) 5.2683
Significance Level of F 0.0005887
Log Likelihood -183.6692 ..HERE THE LAG ORDER = 4 in the original hamilton 1989 program
Durbin-Watson Statistic 1.9984
I would like to obtain the best lag order for my Industrial Production (IP)
time series instead if guessing it using hamilton's MS-AR.
I saw that in the original hamilton's 1989 code, we have the output of the linear regression
in the final result as below.
Could it be possible to obtain such figure from your coding of Hamiltion 1989?
That could be great as it coult help me run 12 times YOUR code with different lag order
before looking at the log-likelihood of all the regression and making a choie of the best lag order that has the
highest log-likelihood in absolute value.
*****************************************
Linear Regression - Estimation by Least Squares
Dependent Variable G
Quarterly Data From 1952:02 To 1984:04
Usable Observations 131
Degrees of Freedom 126
Centered R^2 0.1432832
R-Bar^2 0.1160858
Uncentered R^2 0.4128716
Mean of Dependent Variable 0.7198347939
Std Error of Dependent Variable 1.0663818552
Standard Error of Estimate 1.0025771251
Sum of Squared Residuals 126.65027237
Regression F(4,126) 5.2683
Significance Level of F 0.0005887
Log Likelihood -183.6692 ..HERE THE LAG ORDER = 4 in the original hamilton 1989 program
Durbin-Watson Statistic 1.9984
Re: Hamilton-rpf issue
What you're looking for is @ARAUTOLAGS. Note, however, that unlike most models, the choice of the number of lags in the Hamilton switching model involves more than just a few parameters. Because the Hamilton model switches the process mean (rather than the equation intercept), the regime at each included lag affects the likelihood calculation. If you (for instance) tried 12 lags in the switching model, there would then be 2^13 (or about 8000) branches in the likelihood, which could require several hours to estimate.
Re: Hamilton-rpf issue
Thanks Dear Tom
I will do 1 to 4 lags only
Best
I will do 1 to 4 lags only
Best
Re: Hamilton-rpf issue
If that's what you're doing, just estimate with 4 and trim it if the last is insignificant. @ARAUTOLAGS (or a sequence of LINREG's) is doing the lag test under the assumption of a fixed rather than a switching model---if anything, you would expect it to pick too high a lag for the switching model.