Announcement

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

  • Fixed Effects Quadratic Model Graph

    hello,

    I'm trying to replicate some theory and illustrate a kuznets curve, which is an inverted u shape.
    The regression I am running is:

    LogYit = ß0 + ß1H20it + ß1H20sqit + ß3hcit

    where LogY is the logged values of GDP per capita and h20 reflects water.

    when i use the two graph command, it only gives me the results for the ols regression. The coefficients for water in fixed effects is h20=0.06 and h20sq = -0.00027 - and these coeffients are desired to create a kuznets curve/quadratic curve.

    Can anyone help me create the quadratic graph when using fixed effects??


  • #2
    First, you need to eliminate the H20sq variable and use factor variable notation instead. You don't show sample data. I'll assume your variables are called logy, h2o and hc (whatever that is). Your data presumably has some panel structure, and I'll call the panel variable panel. I'll also assume that the range of values of h2o that are of interest and that you want to graph extends from 50 to 150.

    Code:
    xtset panel
    xtreg logy c.h2o##c.h2o hc, fe
    margins, at(h2o = (50(5)150))
    marginsplot
    You can customize the appearance of the graph by adding just about any of the usual -graph twoway- options to the -marginsplot- command.

    I assume you are not familiar with factor variable notation It's one of Stata's best features. Read Richard William's excellent Stata Journal araticle at http://www.stata-journal.com/sjpdf.h...iclenum=st0260 for an introduction that will cover what you need for this application. Then study the -margins- chapter in the user manuals to learn all the other things -margins- can do.

    Comment

    Working...
    X