I want to create marginsplot for this equation
Code:
logit diabetes i.Age i.year
I tried
Code:
margins Age, at (year= 1999 2004 2007 2011 2014)
marginsplot
and getting this error

Code:
variable '2004' not found in list of covariates
I am only being able to get the plot for Age (but want it to show the curve for all five years and not only for the entire sample)

Code:
margins Age
marginsplot
Array



[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input float year byte Age int diab
2014 3 1
2014 6 0
2014 5 1
2014 1 0
2014 3 1
2014 4 1
2014 6 1
2014 6 1
2014 1 1
2014 5 1
2014 2 0
2014 5 1
2014 2 1
2014 6 1
2014 3 1
2014 2 0
2014 3 0
2014 2 1
2014 4 0
2014 1 1
2014 4 1
2014 3 1
2014 2 1
2014 1 1
2014 1 1
2014 4 1
2014 2 1
2014 5 1
2014 4 1
2014 7 1
2014 2 0
2014 3 0
2014 6 0
2014 4 0
2014 2 0
2014 4 1
2014 4 0
2014 6 0
2014 2 1
2014 7 1
2014 4 1
2014 5 1
2014 4 1
2014 3 0
2014 5 1
2014 5 1
2014 5 1
2014 5 1
2014 7 1
2014 3 1
2014 5 1
2014 3 1
2014 6 1
2014 4 0
2014 7 0
2014 5 1
2014 6 0
2014 5 1
2014 5 1
2014 2 1
2014 1 0
2014 7 1
2014 4 1
2014 5 1
2014 4 1
2014 5 1
2014 6 1
2014 3 1
2014 6 1
2014 3 0
2014 7 1
2014 7 1
2014 6 1
2014 3 1
2014 3 1
2014 3 1
2014 7 1
2014 4 1
2014 6 1
2014 4 1
2014 3 1
2014 2 1
2014 3 1
2014 1 0
2014 3 1
2014 4 1
2014 5 1
2014 6 0
2014 4 1
2014 4 1
2014 5 1
2014 6 1
2014 3 1
2014 4 1
2014 1 1
2014 3 1
2014 5 1
2014 3 1
2014 7 1
2014 2 1
end