Dear Stata friends,
I have a panel dataset coming from a between-subject design experiment where different subjects play for 8 periods in each treatment. I would like to overlay means and standard deviations of my variable of interest against the time variable (period) with lines connecting points that are indicating mean values for each different treatment (so I would like to have 4 lines). This is an example of
what I want to obtain.

Now, I am trying to use the serrbar command but it seems not allowing me to draw different lines for different treatment (for example serrbar does not allow to use the “by” command for group variables like my dummy variable which is “treatment"). I have also tried to use the addplot option to add other serrbar graphs on the same plot but it does not work). For any useful suggestion I would be very grateful.
Francesco
I have a panel dataset coming from a between-subject design experiment where different subjects play for 8 periods in each treatment. I would like to overlay means and standard deviations of my variable of interest against the time variable (period) with lines connecting points that are indicating mean values for each different treatment (so I would like to have 4 lines). This is an example of
what I want to obtain.
Now, I am trying to use the serrbar command but it seems not allowing me to draw different lines for different treatment (for example serrbar does not allow to use the “by” command for group variables like my dummy variable which is “treatment"). I have also tried to use the addplot option to add other serrbar graphs on the same plot but it does not work). For any useful suggestion I would be very grateful.
Francesco
Comment