plotting median with median absolute deviation

HI every one
I would like to plot a concentration time profiles.
I would like to color code them based on dose they have received. I would like to plot the median with absolute deviation

> ggplot(s1, aes(x=Time_plotting, y=DV,group=Dose))+
  geom_point(aes(color=Dose,group=ID, size=0.5))+
  scale_y_log10()+
  aes(colour = factor(Dose))+
  stat_summary(fun = median, size = 1, geom = "line")

I am not able to get the error bars - for the median absolute deviation

Another code i am trying is :

ggline(s1, x = "Time_plotting", y = "DV", group="Dose",color="Dose",
       add = c("mean_se", "jitter"))+yscale("log10", .format = F)

In this i am not able to format the error bars ( i.e. thickness of error bars)

Any help is appreciated

ID TIME DV DOSE
1 5 100 1000
1 10 50 1000
1 15 25 1000
1 20 12.5 1000
1 25 6.25 1000
1 30 3.125 1000
1 35 1.5625 1000
1 40 0.78125 1000
1 45 0.390625 1000
1 50 0.1953125 1000
1 55 0.09765625 1000
1 60 0.048828125 1000
1 65 0.024414063 1000
1 70 0.012207031 1000
1 75 0.006103516 1000
1 80 0.003051758 1000
2 5 100 1000
2 10 50 1000
2 15 25 1000
2 20 12.5 1000
2 25 6.25 1000
2 30 3.125 1000
2 35 1.5625 1000
2 40 0.78125 1000
2 45 0.390625 1000
2 50 0.1953125 1000
2 55 0.09765625 1000
2 60 0.048828125 1000
2 65 0.024414063 1000
2 70 0.012207031 1000
2 75 0.006103516 1000
2 80 0.003051758 1000
3 5 100 1000
3 10 50 1000
3 15 25 1000
3 20 12.5 1000
3 25 6.25 1000
3 30 3.125 1000
3 35 1.5625 1000
3 40 0.78125 1000
3 45 0.390625 1000
3 50 0.1953125 1000
3 55 0.09765625 1000
3 60 0.048828125 1000
3 65 0.024414063 1000
3 70 0.012207031 1000
3 75 0.006103516 1000
3 80 0.003051758 1000
4 5 300 3000
4 10 150 3000
4 15 75 3000
4 20 37.5 3000
4 25 18.75 3000
4 30 9.375 3000
4 35 4.6875 3000
4 40 2.34375 3000
4 45 1.171875 3000
4 50 0.5859375 3000
4 55 0.29296875 3000
4 60 0.146484375 3000
4 65 0.073242188 3000
4 70 0.036621094 3000
4 75 0.018310547 3000
4 80 0.009155273 3000
5 5 300 3000
5 10 150 3000
5 15 75 3000
5 20 37.5 3000
5 25 18.75 3000
5 30 9.375 3000
5 35 4.6875 3000
5 40 2.34375 3000
5 45 1.171875 3000
5 50 0.5859375 3000
5 55 0.29296875 3000
5 60 0.146484375 3000
5 65 0.073242188 3000
5 70 0.036621094 3000
5 75 0.018310547 3000
5 80 0.009155273 3000
6 5 300 3000
6 10 150 3000
6 15 75 3000
6 20 37.5 3000
6 25 18.75 3000
6 30 9.375 3000
6 35 4.6875 3000
6 40 2.34375 3000
6 45 1.171875 3000
6 50 0.5859375 3000
6 55 0.29296875 3000
6 60 0.146484375 3000
6 65 0.073242188 3000
6 70 0.036621094 3000
6 75 0.018310547 3000
6 80 0.009155273 3000

Hi,

In order for us to help you with your question, please provide us a minimal reproducible example where you provide a minimal (dummy) dataset and code that can recreate the issue. Once we have that, we can go from there. For help on creating a Reprex, see this guide:

Good luck!
PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.