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
generate variable with _N but with missing values as welI have a problem with my data. This is an example. Code: input float(id wave year income) 101 2009…
data sorting helpHello, I am trying to find segregation by city and census tract. Attached is a snapshot of the data …
ITSA lincom command to estimate the difference in outcome after a training periodHi I would be grateful for your help. I have run a ITSA using Lindens ITSA command for a survival …
Meta ForestplotHi everyone, I hope someone can help me. When creating a forest of lnRR with the Stata16 new command…
Count the number of global variables defined and input it in another global variableHi, I would like to count the number of global variables defined and input it in another global var…
Subscribe to:
Post Comments (Atom)
0 Response to Marginsplot with missing values of x-variable
Post a Comment