Dear Statalist community,
I need help with two things:
One, I want to use the margins and marginsplot command to illustrate findings from a quadratic variable in fixed effects panel models.
Two, I want to illustrate the findings from the margins and marginsplot with the quadratic variable in level form (the original IV is logged but want to make the findings more intuitive for the audience).
Details:
Cross-sectional longitudinal country-level data from the World Bank's World Development Indicators and the United Nations Center for Trade and Development
Dependent variable: Economic growth (annual percentage change in GDP per capita), level form
Independent variable of interests:
1) Foreign direct investment stock as a percentage of GDP, logged
2) Foreign direct investment stock as a % of GDP 2
Other relevant IVs included and will mention if necessary
MODEL:xtreg DV IV, fe vce(cluster country)
I am finding that a positive significant association between FDI stocks as a percentage of GDP (ln) and economic growth. The quadratic is negative in direction and statistically significant.
What I need help with:
1) I want to use margins and marginsplot to graph the aforementioned finding. Can someone help me with the syntax to graph the quadratic?
What I normally do is:
margins, at ( IV = ( () ))
marginsplot
2) I want to graph the quadratic using margins and marginsplot. However, FDI stocks as a % of GDP (ln) on the x axis is not quite intuitive. I want to present FDI stocks as a percentage of GDP in level form after conducting the regression analysis with this IV logged. Hopefully this makes sense.
I tried the following syntax to automate the exponentiation but this syntax only changed the DV (in analyses of CO2 emissions (ln) ).
margins, at (IV = (#(#)#)) expression (exp(predict(xb)))
Really appreciate the help!
-Andrew
Related Posts with Using MarginsPlot to visualize Quadratics in Panel Data
Implications of nrep(#) on mixlogit analysisDear All, I am analyzing discrete choice experiment data through the user-written command mixlogit.…
Logistic regression "outcome does not vary" I got values on an independent variables for only one of the options of my dependent variableLogistic regression "outcome does not vary" Hello, I know which variable is giving me problems, bu…
merging datasetsDear All, I want to merge a dimension repeated cross section data with another two-repeated cross se…
Options parsing in syntaxDear All, consider the following example code: Code: clear all version 16.0 program define foobar …
Show the data in the graph Hi, friends, might I be able to show the values of the data in the graph? My initial command is, …
Subscribe to:
Post Comments (Atom)
0 Response to Using MarginsPlot to visualize Quadratics in Panel Data
Post a Comment