Announcement

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

  • Running Panel Regression using IVREG2H

    Hi all,
    I have been dealing with panel data. I ran a panel instrumental variable regression using 'xtivreg' command. As a robustness check, I wanted to run lewbel (2012) regression using 'ivreg2h' command. But I have not been able to run 'fe' component in this command despite my data being a panel one. I am getting my results as if my data was a pooled cross-sectional data. Please help.

  • #2
    ivreg2h is from SSC (FAQ Advice #12). You need to include the -fe- option to run a fixed effects model. Otherwise you show no code or output, so it is difficult to advise you appropriately. See the referenced FAQ for details on how to effectively post in the forum.

    Comment


    • #3
      Hi, ivlewfe helps to control multiple fixed effects for Lewbel (2012). You can install it using
      Code:
      net install ivlewfe, from("https://raw.githubusercontent.com/woahidmurad/ivlewfe/main/") replace

      Comment


      • #4
        Hi S. M. Woahid Murad ,

        I need to estimate FE-2SLS with the Lewbel IV. I've used both the ivreg2hfe and ivlewfe commands for estimation, and the results are completely different.
        I've read ivlewfe.ado and noticed that, in the case of FE-2SLS (as well as HDFE-2SLS), the Lewbel IV are generated differently than with ivreg2hfe.

        Normally, when estimating the parameters of an FE model, one first uses the within transform to remove fixed effects (u_i), then applies pooled OLS to the transformed data, and finally estimates u_i and adjusts for degrees of freedom. The same applies to FE-2SLS and pooled 2SLS.
        And with the Lewbel tool, ivreg2hfe does the same thing in generating the Lewbel-style tool.

        iv1*_g = (x2*-x2*_mean)*e1*

        Where x2* is the time-demeaned exogenous variable, e1* is the residual of the initial regression on the transformed data. Lewbel's assumptions would be required on the transformed data.
        But ivlewfe use the original variable x2 instead of x2*, i.e:

        (x2-x2_mean)*e1*

        This seems incorrect! I'm confused when considering Lewbel's assumptions, are they applied to the original data or the transformed data?
        Manh Hoang-Ba,
        Facebook,
        Eureka! Uni - YouTube,
        ManhHB94 (Manh Hoang Ba),
        Hoàng Bá Mạnh – Kinh tế lượng: Lý thuyết và ứng dụng

        Comment


        • #5
          transformed

          Comment


          • #6
            Originally posted by George Ford View Post
            transformed
            I completely agree. In that way—transforming the data first—Lewbel's assumptions are simply placed on the transformed data when performing the 2SLS estimation.

            I'm just trying to understand how ivlewfe is generating the instrumental variables. I can't extend the assumptions Lewbel makes to that approach.
            Manh Hoang-Ba,
            Facebook,
            Eureka! Uni - YouTube,
            ManhHB94 (Manh Hoang Ba),
            Hoàng Bá Mạnh – Kinh tế lượng: Lý thuyết và ứng dụng

            Comment


            • #7
              in ivlewfe, at line 122/3 the residuals are obtained. the code at 125+ gets the transformed variables * error.

              all IV `alliv' are set at 146.
              Last edited by George Ford; 29 Apr 2026, 15:01.

              Comment

              Working...
              X