Hello,
Apologies if this is answered elsewhere, I have read through help files and done a bit of googling, but cannot find the answer.
I have a fairly simple dataset of student scores (idelapct) nested in ECCD Centers (centerid) nested in districts (districtid). After looking through the data, it's clear to me that the ICC in one district (which contains a lot of minority language speakers) is dramatically higher than the other three districts. I would like to represent this graphically through a series of boxplots showing the scores within each school.
This is easy enough to do with
graph box, over(centerid)

But I would also like to differentiate the boxplots and color them according to their districtid to highlight this disparity. In R what I am trying to do would be achieved by:
boxplot(mydata$idelapct ~ mydata$centerid, col = mydata$centerid)

Is there an equivalent expression in Stata that I could use?
Thanks!
Jonathan
Apologies if this is answered elsewhere, I have read through help files and done a bit of googling, but cannot find the answer.
I have a fairly simple dataset of student scores (idelapct) nested in ECCD Centers (centerid) nested in districts (districtid). After looking through the data, it's clear to me that the ICC in one district (which contains a lot of minority language speakers) is dramatically higher than the other three districts. I would like to represent this graphically through a series of boxplots showing the scores within each school.
This is easy enough to do with
graph box, over(centerid)
But I would also like to differentiate the boxplots and color them according to their districtid to highlight this disparity. In R what I am trying to do would be achieved by:
boxplot(mydata$idelapct ~ mydata$centerid, col = mydata$centerid)
Is there an equivalent expression in Stata that I could use?
Thanks!
Jonathan
Comment