Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the autocorrelation test operation and its analysis in stata

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

What is the autocorrelation test operation and its analysis in stata? in order to solve this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Autocorrelation test in regression analysis diagnosis is another important content, it has many kinds of test methods, including graphic method, BG test, Q test, DW test and so on. This paper introduces how to use stata to test the graphic method, including the scatter plot of residual and its lagging first-order residual, the autocorrelation map of residual, and how to analyze and judge the results.

one

Here, the US gasoline demand data gasoline.dta is selected as an example. There are 52 samples. The data are shown as follows:

The following regression model is established here:

Estimate using stata, the code is:

Regress lgasq lincome lgasp lpnc lpuc

The result is:

two

First of all, carry on the first graphic method:

Draw the scatter diagram and linear fitting graph of the residual and its lag of the first order.

Predict   E1 restwoway (scatter E1 L.e1) (lfit E1 L.e1)

Get the graphics:

According to the scatter plot and linear fitting diagram of the residual, it can be seen that there is a certain linear correlation between the residual E1 and the residual of the first order lagging behind. Therefore, the equation may have autocorrelation.

three

Then there is the second graphic method:

Autocorrelation diagram of residual

Ac e1

The result is:

The first vertical bar means that the autocorrelation coefficient when the time delay is 1 is about 0.70, and so on. The shaded areas of the 95% confidence interval of the gray area in the picture are marked, and the correlations outside this interval are individual significant. From the above picture, there is a significant autocorrelation between the residual and the first and second order of lag, which also shows that the equation may have autocorrelation.

This is the answer to the question about the autocorrelation test operation and its analysis in stata. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report