Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sanderson-Windmeijer Multivariate F Test of Excluded Instruments Error

    Hi,

    I'm trying to output the Sanderson-Windmeijer Multivariate F-test Statistics from the following IV regression with two endogenous variables. However, the F-statistics stored in the scalar list is not correct. Only the Kleibergen-Paap rk Wald F statistic is reported instead of the two SW F-stats. See below for reference:

    eststo m1: ivreghdfe d.d_med_pc (d.v_flow d.v_omc_h1 = d.z d.z_omc_h1 ), a(year) first ffirst savefprefix(s1) nocons cluster(municipality)
    ereturn list


    Output:
    First-stage regressions
    -----------------------


    First-stage regression of D.v_flow:

    Statistics robust to heteroskedasticity and clustering on municipality
    Number of obs = 7909
    Number of clusters (municipality) = 719
    ------------------------------------------------------------------------------
    | Robust
    D.v_flow | Coefficient std. err. t P>|t| [95% conf. interval]
    -------------+----------------------------------------------------------------
    z |
    D1. | 1.139551 .430534 2.65 0.008 .2955908 1.983512
    |
    z_omc_h1 |
    D1. | -.0214228 .265841 -0.08 0.936 -.5425415 .4996958
    ------------------------------------------------------------------------------
    F test of excluded instruments:
    F( 2, 718) = 12.23
    Prob > F = 0.0000
    Sanderson-Windmeijer multivariate F test of excluded instruments:
    F( 1, 718) = 27.26

    Prob > F = 0.0000


    First-stage regression of D.v_omc_h1:

    Statistics robust to heteroskedasticity and clustering on municipality
    Number of obs = 7909
    Number of clusters (municipality) = 719
    ------------------------------------------------------------------------------
    | Robust
    D.v_omc_h1 | Coefficient std. err. t P>|t| [95% conf. interval]
    -------------+----------------------------------------------------------------
    z |
    D1. | .0144223 .430717 0.03 0.973 -.829897 .8587415
    |
    z_omc_h1 |
    D1. | 1.098167 .427669 2.57 0.010 .259823 1.936512
    ------------------------------------------------------------------------------
    F test of excluded instruments:
    F( 2, 718) = 10.95
    Prob > F = 0.0000
    Sanderson-Windmeijer multivariate F test of excluded instruments:
    F( 1, 718) = 29.75

    Prob > F = 0.0000


    However, when I run ereturn list, I see that the F-statistics for each variable are not stored, but that the KP Wald F stat is instead reported in e(widstat).

    ereturn list

    scalars:
    e(Fdf2) = 718
    e(Fdf1) = 2
    e(Fp) = .0414126750250851
    e(F) = 3.198331196069045
    e(r2_a) = -.0259381897401811
    e(mss) = -921824.0268106684
    e(rss) = 38932273.40038206
    e(rmse) = 70.21846193273059
    e(r2) = -.0242518581601303
    e(center) = 0
    e(dofminus) = 0
    e(sdofminus) = 11
    e(df_m) = 2
    e(N_clust) = 719
    e(df_r) = 718
    e(partial_ct) = 11
    e(endog_ct) = 2
    e(exexog_ct) = 2
    e(inexog_ct) = 0
    e(N) = 7909
    e(N_full) = 7909
    e(num_singletons) = 0
    e(drop_singletons) = 1
    e(ic) = 1
    e(df_a_nested) = 0
    e(df_a_redundant) = 0
    e(df_a_initial) = 11
    e(df_a) = 11
    e(N_hdfe_extended) = 1
    e(N_hdfe) = 1
    e(cons) = 0
    e(partialcons) = 11
    e(nocollin) = 0
    e(sstatdf) = 2
    e(sstatp) = .0681076746082985
    e(sstat) = 5.37333075203861
    e(ardf_r) = 718
    e(ardf) = 2
    e(archi2p) = .0656862437120724
    e(archi2) = 5.445731511496895
    e(arfp) = .0668878351923897
    e(arf) = 2.71495267011977
    e(rkf) = 8.92580562602279
    e(cdf) = 130.7567572003489
    e(widstat) = 8.92580562602279
    e(cd) = .033119745998062
    e(idp) = .0004749149328681
    e(iddf) = 1
    e(idstat) = 12.21167039479249
    e(jdf) = 0
    e(j) = 0
    e(ll) = -44841.87302155136
    e(rankV) = 2
    e(rankS) = 2
    e(rankxx) = 2
    e(rankzz) = 2
    e(condxx) = 16.93538697919588
    e(condzz) = 17.35654678624282
    e(r2c) = -.0242518581601303
    e(r2u) = -.0242518581601303
    e(yyc) = 38010449.37357139
    e(yy) = 38010449.37357139

    macros:
    e(predict) : "reghdfe_p"
    e(version) : "04.1.10"
    e(ivreg2cmd) : "ivreghdfe"
    e(cmd) : "ivreghdfe"
    e(clustvar) : "municipality"
    e(extended_absvars) : "year"
    e(absvars) : "year"
    e(dofmethod) : "pairwise clusters continuous"
    e(hacsubtitleV) : "Statistics robust to heteroskedasticity and clustering on municipality"
    e(hacsubtitleB) : "Estimates efficient for homoskedasticity only"
    e(title) : "IV (2SLS) estimation"
    e(cmdline) : "ivreg2 d.d_med_pc (d.v_flow d.v_omc_h1 = d.z d.z_omc_h1 ), a(year) first ffirst savefprefix(s1) nocons cluster(municipality)"
    e(model) : "iv"
    e(firsteqs) : "s1D_v_flow s1D_v_omc_h1"
    e(vcetype) : "Robust"
    e(vce) : "robust cluster"
    e(partialsmall) : "small"
    e(small) : "small"
    e(depvar) : "D.d_med_pc"
    e(depvar0) : "D.d_med_pc"
    e(depvar1) : "D.d_med_pc"
    e(instd) : "D.v_flow D.v_omc_h1"
    e(instd0) : "D.v_flow D.v_omc_h1"
    e(instd1) : "D.v_flow D.v_omc_h1"
    e(insts) : "D.z D.z_omc_h1"
    e(insts0) : "D.z D.z_omc_h1"
    e(insts1) : "D.z D.z_omc_h1"
    e(exexog) : "D.z D.z_omc_h1"
    e(exexog0) : "D.z D.z_omc_h1"
    e(exexog1) : "D.z D.z_omc_h1"
    e(marginsnotok) : "Residuals SCores XB default"
    e(properties) : "b V"

    matrices:
    e(b) : 1 x 2
    e(V) : 2 x 2
    e(dof_table) : 1 x 5
    e(first) : 21 x 2
    e(cdev) : 1 x 2
    e(ccev) : 1 x 2
    e(W) : 2 x 2
    e(S) : 2 x 2

    functions:
    e(sample)


    When I run this regression using a single endogenous variable, e(widstat) properly stores the F-statistics, but not with 2. Can someone please advise?

  • #2
    Hello Aryan,

    This reply is a bit late but I hope this can help others.
    The first stage estimates are stored in the matrix e(first).

    Code:
    mat FIRST = e(first)
    mat list FIRST

    Comment

    Working...
    X