Hi,
This is probably a very easy problem but I have been trying to find this out for a while and cant make it work.
I have a continuous variable (optical density of a haemorrhage=DfrontalLR) for which I want to create histogram, which is not the problem. But the variable (optical density) should be divided/split based on another variable (haemorrhage yes/no=CTresult). Attached is the example.
I've tried:
twoway (hist DfrontalLR) (hist CTresult)
hist DfrontalLR, by (CTresult) width (0.1)
-> this
Is there, I'm sure there is, a command where I have the two groups in the same window with a different colour as in the attached screenshot?
Thanks!
This is probably a very easy problem but I have been trying to find this out for a while and cant make it work.
I have a continuous variable (optical density of a haemorrhage=DfrontalLR) for which I want to create histogram, which is not the problem. But the variable (optical density) should be divided/split based on another variable (haemorrhage yes/no=CTresult). Attached is the example.
I've tried:
twoway (hist DfrontalLR) (hist CTresult)
hist DfrontalLR, by (CTresult) width (0.1)
-> this
Is there, I'm sure there is, a command where I have the two groups in the same window with a different colour as in the attached screenshot?
Thanks!
Comment