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

How to draw the scatter plot and linear fitting diagram of the residual and its lag of the first order after regression by stata

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

Share

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

This article shows you how stata draws the scatter chart and linear fitting chart of the residual and its lag one order after regression. The content is concise and easy to understand, which can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Regression analysis is the study of the dependent relationship between an explained variable (dependent variable) and another or more explanatory variables (independent variables). Its purpose is to estimate and predict the total average value of the explained variable according to the known value of the explanatory variable or the fixed value of the explanatory variable (repeated sampling).

When studying the law of the development and change of a socio-economic phenomenon, the phenomenon or object studied is called the explained variable, which is the object of analysis. The factor that causes the change of this phenomenon is called the explanatory variable, which is the cause of the change of this phenomenon.

For the general linear regression equation, it is as follows:

After linear regression estimation, we often have to test the effect of regression, that is, the assumptions we make in the estimation, such as autocorrelation, heteroscedasticity, multicollinearity and so on.

For a test method of autocorrelation, that is, the graphic method, we can take a look at the residual after regression estimation and its lag first-order scatter graph and linear fitting graph, because it is assumed that the residual should obey the assumption of random disturbance. so it depends on whether there is autocorrelation in the estimated residuals.

In stata, we can use the following command to draw the scatter plot and linear fitting graph of the residual after regression estimation and its lag of one order:

Reg y x1 x2 x3

Predict   e1,res

Twoway (scatter E1 L.e1) (lfit E1 L.e1)

Here predict   E1 training res is the residual sequence generated after regress regression, and L.e1 is the sequence in which the residual sequence lags one period.

An example of the result is as follows:

The above content is how stata draws the scatter plot and linear fitting chart of the residual and its lag one order after regression. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

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