Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: Using ivhettest to test for heterogeneity |

Date |
Tue, 28 Feb 2012 16:33:07 -0000 |

Andreas, > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > andreas.zweifel@uzh.ch > Sent: 27 February 2012 08:38 > To: statalist@hsphsun2.harvard.edu > Subject: st: RE: Using ivhettest to test for heterogeneity > > Dear Mark, > > Thank you for explaining me the usage of the two different commands. > Unfortunately, I cannot infer whether the two commands give the same > results from your toy auto example because I miss the -ivhettest- > command below. Sorry, my fault - I should have added the following for the example from the toy auto dataset: . ivhettest, ivcp nr2 OLS heteroskedasticity test(s) using levels and cross products of all IVs Ho: Disturbance is homoskedastic White/Koenker nR2 test statistic : 5.890 Chi-sq(2) P-value = 0.0526 > But kindly have a look at the following example using > my own dataset. There is a marked difference between the results after > calling -imtest, white- and -ivhettest, ivsq nr2-. I would be happy to > know where this difference must likely come from. And the rest of the toy auto example above answers your question: you need to use the -ivcp- rather than the -ivsq- option. The White general test uses the full set of instruments in levels, their squares, and their cross-products. I note, by the way, that in your regression you have 98 observations. The general White test can rapidly use up degrees of freedom, because the degrees of freedom correspond to the unique elements of the VCV. In your case, the general White test has 89 degrees of freedom, and with 98 observations you're not going to get much power. This is probably why the general White test doesn't reject homoskedasticity in your example, whereas the way you called -ivhettest- (using the -ivsq- option and hence ignoring the cross-products) gave you a test stat with fewer degrees of freedom (24 instead of 89) and more power. HTH, Mark > > . reg COC DRANK LBAGE D_LBAGE LNMV LNBM LNLEV CapInt ROA > AssTr LTG LVOL MAFE if FIN==0 > > Source | SS df MS Number > of obs = 98 > -------------+------------------------------ F( 12, > 85) = 24.23 > Model | .156474018 12 .013039502 Prob > > F = 0.0000 > Residual | .04574489 85 .000538175 > R-squared = 0.7738 > -------------+------------------------------ Adj > R-squared = 0.7418 > Total | .202218908 97 .002084731 Root > MSE = .0232 > > -------------------------------------------------------------- > ---------------- > COC | Coef. Std. Err. t P>|t| > [95% Conf. Interval] > -------------+------------------------------------------------ > ---------------- > DRANK | -.2832065 .1170839 -2.42 0.018 > -.5160006 -.0504123 > LBAGE | -.0152769 .0087299 -1.75 0.084 > -.0326344 .0020806 > D_LBAGE | .032221 .0134307 2.40 0.019 > .0055172 .0589248 > LNMV | -.0046663 .0022202 -2.10 0.039 > -.0090806 -.000252 > LNBM | .0030857 .0060793 0.51 0.613 > -.0090016 .015173 > LNLEV | .0093984 .0140586 0.67 0.506 > -.0185538 .0373506 > CapInt | -.0209075 .0201706 -1.04 0.303 > -.0610121 .0191972 > ROA | -.0582245 .0346929 -1.68 0.097 > -.1272033 .0107543 > AssTr | -.0037709 .0039292 -0.96 0.340 > -.0115832 .0040414 > LTG | .0009717 .0000776 12.53 0.000 > .0008175 .001126 > LVOL | -.0011873 .0096773 -0.12 0.903 > -.0204284 .0180538 > MAFE | .0030178 .0005758 5.24 0.000 > .0018729 .0041626 > _cons | .2751544 .0723573 3.80 0.000 > .1312886 .4190201 > -------------------------------------------------------------- > ---------------- > > . > end of do-file > . > . imtest, white > > White's test for Ho: homoskedasticity > against Ha: unrestricted heteroskedasticity > > chi2(89) = 97.10 > Prob > chi2 = 0.2613 > > Cameron & Trivedi's decomposition of IM-test > > --------------------------------------------------- > Source | chi2 df p > ---------------------+----------------------------- > Heteroskedasticity | 97.10 89 0.2613 > Skewness | 17.64 12 0.1272 > Kurtosis | 1.82 1 0.1769 > ---------------------+----------------------------- > Total | 116.56 102 0.1537 > --------------------------------------------------- > > . ivhettest, ivsq nr2 > OLS heteroskedasticity test(s) using levels and squares of IVs > Ho: Disturbance is homoskedastic > White/Koenker nR2 test statistic : 58.500 Chi-sq(24) > P-value = 0.0001 > > > > > > -----owner-statalist@hsphsun2.harvard.edu wrote: ----- > To: <statalist@hsphsun2.harvard.edu> > From: "Schaffer, Mark E" > Sent by: owner-statalist@hsphsun2.harvard.edu > Date: 02/24/2012 11:51PM > Subject: st: RE: Using ivhettest to test for heterogeneity > > Andreas, > > > -----Original Message----- > > From: owner-statalist@hsphsun2.harvard.edu > > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > > andreas.zweifel@uzh.ch > > Sent: 24 February 2012 20:14 > > To: statalist@hsphsun2.harvard.edu > > Subject: st: Using ivhettest to test for heterogeneity > > > > Dear Statalist users, > > > > I am concerned with using White's general heteroskedasticity > > test when running an instrumental variables regression. There > > is an option "nr2" which can be used with -ivhettest- after > > the -ivreg2- command that displays the White-Koenker test > > statistic. > > This is a test of heteroskedasticity in the IV equation (or > "2nd stage" > if you prefer). > > > However, when I run the first-stage regression > > manually and use the command "imtest, white", I get a very > > different value for the test statistic. > > Because it's a test of heteroskedasticity in the first-stage > regression. > > > The help file for -ivhettest- claims that this command can > > also be used for OLS regressions. > > It can; see the example in the help file. You estimate using OLS > (-regress- or -ivreg2-), then call -ivhettest-. > > > But why do the -ivhettest- > > and -imtest- commands yield different test statistics? > > They should be the same. Estimate using OLS and -regress-, and then > compare -imtest, white- with -ivhettest, ivsq nr2-. You > should get the > same result. Below is an example using the toy auto dataset. > > Cheers, > Mark > > > . reg mpg weight > > Source | SS df MS Number of obs = > 74 > -------------+------------------------------ F( 1, 72) = > 134.62 > Model | 1591.9902 1 1591.9902 Prob > F = > 0.0000 > Residual | 851.469256 72 11.8259619 R-squared = > 0.6515 > -------------+------------------------------ Adj R-squared = > 0.6467 > Total | 2443.45946 73 33.4720474 Root MSE = > 3.4389 > > -------------------------------------------------------------- > ---------- > ------ > mpg | Coef. Std. Err. t P>|t| [95% Conf. > Interval] > -------------+------------------------------------------------ > ---------- > ------ > weight | -.0060087 .0005179 -11.60 0.000 -.0070411 > -.0049763 > _cons | 39.44028 1.614003 24.44 0.000 36.22283 > 42.65774 > -------------------------------------------------------------- > ---------- > ------ > > . imtest, white > > White's test for Ho: homoskedasticity > against Ha: unrestricted heteroskedasticity > > chi2(2) = 5.89 > Prob > chi2 = 0.0526 > > Cameron & Trivedi's decomposition of IM-test > > --------------------------------------------------- > Source | chi2 df p > ---------------------+----------------------------- > Heteroskedasticity | 5.89 2 0.0526 > Skewness | 4.92 1 0.0266 > Kurtosis | 1.70 1 0.1919 > ---------------------+----------------------------- > Total | 12.51 4 0.0139 > --------------------------------------------------- > > > Is the > > -ivhettest- a combined heteroskedasticity test that is > > computed from individual test statistics of the first-stage > > and reduced form regression in the case of 2SLS? > > > > Any help would be greatly appreciated! > > > > Andreas Zweifel > > * > > * For searches and help try: > > * http://www.stata.com/help.cgi?search > > * http://www.stata.com/support/statalist/faq > > * http://www.ats.ucla.edu/stat/stata/ > > > > > -- > Heriot-Watt University is a Scottish charity > registered under charity number SC000278. > > Heriot-Watt University is the Sunday Times > Scottish University of the Year 2011-2012 > > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > -- Heriot-Watt University is a Scottish charity registered under charity number SC000278. Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: RE: Using ivhettest to test for heterogeneity***From:*andreas.zweifel@uzh.ch

**References**:**st: RE: Using ivhettest to test for heterogeneity***From:*andreas.zweifel@uzh.ch

- Prev by Date:
**Re: st: Datamanagement: warning when using infile with optional if** - Next by Date:
**Re: st: RE: New package -wridit- on SSC** - Previous by thread:
**st: RE: Using ivhettest to test for heterogeneity** - Next by thread:
**st: RE: RE: Using ivhettest to test for heterogeneity** - Index(es):