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

Stata uses rvpplot to directly obtain residual diagrams for heteroscedasticity test.

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

In this issue, the editor will bring you about how stata uses rvpplot to directly obtain residual diagrams for heteroscedasticity test. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

After OLS regression, we can use the residual diagram to test the heteroscedasticity of the model, that is, we can judge whether there is a correlation between the residual and the explanatory variables through the graphic change law between the residual and the explanatory variables, which violates the classical hypothesis. In Eviews, it is usually necessary to generate residual variables to construct scatter plots of residuals and explanatory variables, but in stata, rvpplot can be used to obtain residual diagrams directly for heteroscedasticity test.

one

data

We have established an economic model of Beijing's passenger volume (the number of passengers transported) and carried out research on it. Through different comparisons, our model variables are the logarithm of lny-- passenger volume in Beijing (ten thousand people), the number of passenger cars owned by x1muri-Beijing highway operation (ten thousand vehicles), the number of people employed in road transport in Beijing (ten thousand people), and the gross domestic product (GDP) of x3 in Beijing. Among them, lny is the explained variable, x1, x2 and x3 are all explanatory variables. Some of the data are as follows:

one

OLS and residual Graph

First, do OLS regression.

.reg lny x1 x2 x3

After completing the regression, you can use the command to get the residual graph.

.rvpplot x1

As can be seen from the chart, the larger the number of passenger vehicles in highway operation (x1), the variance of the disturbance term does not change obviously, indicating that there is no heteroscedasticity.

.rvpplot x2

As can be seen from the chart, the larger the number of people employed in the road transport industry (x2), the variance of the disturbance term does not change significantly, indicating that there is no heteroscedasticity.

.Rvpplot x3

As can be seen from the chart, the larger the regional gross domestic product (x3), the variance of the disturbance term does not change obviously, indicating that there is no heteroscedasticity.

Next, we can use BP test and white test to further judge.

The above is the stata that Xiaobian shared with you how to use rvpplot to directly obtain the residual map for heteroscedasticity test, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, 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