Dear all,
I am trying to plot fitted values on the month variable. Where Month variable has information for the months from Jan to Aug and then Dec. There is no information available for the months of Sep to Nov. I am using the following code:
reg nfhs3_n i.month12 if round ==3
margins month12, saving("D:\Dropbox\UNICEF\NFHS3.dta", replace)
reg nfhs_com i.month12 if round ==3
margins month12, saving("D:\Dropbox\UNICEF\NFHS4.dta", replace)
combomarginsplot "D:\Dropbox\UNICEF\NFHS3.dta" "D:\Dropbox\UNICEF\NFHS4.dta", labels("Actual NFHS3 " "Estimated NFHS-3") ytitle (Mean Predicted Values) title(ZWFH)
It is generating the following graph
Array
Since there is no coefficient reported for the months of Sep, Oct and Nov. It is simply connecting the coefficient for the month of Aug to coefficient for the month of Dec.
Doubt: However, I would like to have a blank line instead of connecting line over these missing months. Is there way to do this?
Thank you.
Related Posts with Marginsplot with missing values of x-variable
Tariff data to use in StataHello, I am new to this forum and econometrics in general so im not sure this is a appropriate line…
PPMLHDFE - Regression not startingDear Statalist forum, I am currently tring to run a gravity equation using the PPMLHDFE command and…
Reshape long Datastream equity dataHi, I have the following type of wide panel data downloaded directly from Datastream. The stucture …
How to add extra column to summary statistics with asdoc?Dear all, I am using the asdoc tool to export my tables to word. However, I am struggling to add an…
egen numeric variableDear Stata users, Please take a look at this problem: I wish to generate a unique identifier for a …
Subscribe to:
Post Comments (Atom)
0 Response to Marginsplot with missing values of x-variable
Post a Comment