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
Variable Construction based on Time StampsDear Statalist, I have a dataset that records the time when staffs successfully pick the products a…
Bayestest model not showing posterior probabilitiesDear Stata Users community, I am trying to compare the posterior probabilities of a series of ologi…
BOX PLOT WITH INDIVIDUAL OBSERVATION--How to writeHi to everybody. I have to do a boxplot with individual observations using the dataset below: clea…
filling in missing values for panel dataHi there, I have panel data in which the education variable has missing values. I must use the surr…
DEA commands: dea vs. teradialbcGood day, Using the dea command produces technical efficiency scores with values b/t 0-1. However, …
Subscribe to:
Post Comments (Atom)
0 Response to Using MarginsPlot to visualize Quadratics in Panel Data
Post a Comment