Dear all,
I am running currently running a poisson regression on my panel data using -xtpoisson- and I am having a problem with creating a margins-plot after my estimation.
I am using Stata 15.1 for Windows.
My data set comprises of 60 countries for the years 2009-2016 and includes variables on economic conditions of the country as well as data on IMF loans such as the number of conditons (my dependent variable). My main independent variable of interest is USFDI.
As the number of conditions on loans is a count variable, I ran -xtpoisson- such as:
and then I used:
to get my margins plot of USFDI to make interpretation of the results easier as looking only at the regression coefficients is not straight forward for -xtpoisson-.
However, the output I am getting looks like this:

which looks like a linear prediction and the convidence intervals look akward to me as well. I am not sure what exactly might be wrong with it.
Ideally, I want to have a margins plot accounting for potential non-linearity of the regression as well as indicating the effect of the explanatory variables as predicted probability as a percentage change. However, I am not sure how to achieve this and could not find an answer anywhere else in this forum yet.
Any help would be greatly appreciated.
Thank you in advance.
Kira
I am running currently running a poisson regression on my panel data using -xtpoisson- and I am having a problem with creating a margins-plot after my estimation.
I am using Stata 15.1 for Windows.
My data set comprises of 60 countries for the years 2009-2016 and includes variables on economic conditions of the country as well as data on IMF loans such as the number of conditons (my dependent variable). My main independent variable of interest is USFDI.
As the number of conditions on loans is a count variable, I ran -xtpoisson- such as:
Code:
xtpoisson NumberofConditions USFDI ControlVariables i.Year, fe vce(robust)
Code:
margins, at (USFDI =(0 1 2 3 4 5 6 7 8 9 10 )) predict(nu0) marginsplot, recast(line) recastci(rarea)
However, the output I am getting looks like this:
which looks like a linear prediction and the convidence intervals look akward to me as well. I am not sure what exactly might be wrong with it.
Ideally, I want to have a margins plot accounting for potential non-linearity of the regression as well as indicating the effect of the explanatory variables as predicted probability as a percentage change. However, I am not sure how to achieve this and could not find an answer anywhere else in this forum yet.
Any help would be greatly appreciated.
Thank you in advance.
Kira
Comment