Announcement

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

  • "coefplot" for multiple regression coefficients

    Hi, I am using a 2SLS FE regression model. With different model specifications I want to plot 2nd stage regression coefficient for only one variable to see how it bahaves.

    I am using the following loop:

    gen x1=0
    local w "gds inv_oda_shareGDPAVN fdi_netinf_gdpwdi L.gTFP_pwt L.gWm_215A irr unctad_pci bgtdef pol_stab i.d_year*"
    local y "x1 gTFP_pwt gWm_215A irr unctad_pci bgtdef pol_stab i.d_year*"
    local i=1

    forvalues x=1(1)6 {
    quietly xtreg gKm2 `w' if world_region==`x', fe cluster(id)
    predict temp
    replace x1= temp if world_region==`x'
    drop temp
    quietly xtreg gLm_215A `y' if world_region==`x', fe cluster(id)
    estimates store m`i'

    }


    coefplot (m1, label(m1)) (m2, label(m2)) (m3, label(m3)) (m4, label(m4)) (m5, label(m5)) (m6, label(m6)) ///
    , keep(x1) xline(0)

    BUT when I plot the coefficients it says m2 is not found. Indeed instead of six estimates, it saves only the first one. Am I missing something in my syntax. Will be grateful for advice please?
Working...
X