I have a study where there are two timepoints where we have collected data (BTX2 (pre) and BTX3 (post)), one time point is prior to an intervention and one is after. I would like to plot the results in a boxplot showing the pre and post split first by treatment group (control vs. intervention) and then by study weight (normal vs overweight). So what i was envisioning is that pre and post would be designated in two different colors, which would be split into two side by side pairs of boxplot (control vs treatment) and then these would be plotted side by side grouped by normal vs overweight. See sketch below.

But what I'm struggling with is the grouping of normal vs overweight. And I'm not sure if STATA can graph this way. Basically each time point (BTX2 and BTX3) have individual binary variables for weight (btxweight_2 and btxweight_3) where 0= normal weight and 1=overweight. As far as I can tell STATA will only let me graph by one weight category.
graph box btx2 btx3, over(treat) over(btxweight_2)
Is there a way in STATA to split the boxplot correlating the pre (BTX2) with the weight variable btxweight_2 and the post with its corresponding weight variable?
I appreciate any input or suggestions on how else to represent the data in this way and thank you for your patience if this is a fairly easy thing to do that I am unaware as a new learner.
But what I'm struggling with is the grouping of normal vs overweight. And I'm not sure if STATA can graph this way. Basically each time point (BTX2 and BTX3) have individual binary variables for weight (btxweight_2 and btxweight_3) where 0= normal weight and 1=overweight. As far as I can tell STATA will only let me graph by one weight category.
graph box btx2 btx3, over(treat) over(btxweight_2)
Is there a way in STATA to split the boxplot correlating the pre (BTX2) with the weight variable btxweight_2 and the post with its corresponding weight variable?
I appreciate any input or suggestions on how else to represent the data in this way and thank you for your patience if this is a fairly easy thing to do that I am unaware as a new learner.
Comment