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 perform heteroscedasticity Test in stata and its Analysis

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

Share

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

How to carry out the heteroscedasticity test operation and its analysis in stata, aiming at 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.

Heteroscedasticity test in regression analysis diagnosis is one of the important contents, it has many test methods, including graphic method, BP test, White test and so on. This paper introduces how to use stata to carry out BP test and White test, and how to analyze and judge the results.

one

Here we select the mortgage data of Boston as an example. There are 506 samples. The data are shown as follows:

The following regression model is established here:

Estimate using stata, the code is:

Regress lprice lnox ldist rooms stratio

The result is:

two

First of all, carry out the BP inspection:

According to the results of stata estimation, BP test is used to determine whether the equation has heteroscedasticity. The basic principle of Bmurp test is to test whether there is heteroscedasticity by R ^ 2 of auxiliary regression.

First of all, the fitting value y_hat is checked by default, and the code is:

Estat hettest,iid

Here iid: indicates that the disturbance term is independently and identically distributed (normal distribution without default)

The results are obtained:

The results show that when an is given, the chi-square statistic chi2 (1) of BP test is 127.21 and the corresponding p value is 0.000.

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