I have seen very similar questions but none that quite fit exactly what I am trying to do. I have the following RWE:
n1 = 177
avg1 = 7.508192
sd1 = 5.439677
error1 <- qnorm(.975) * sd1/sqrt(n1)
avg1 - error1
avg1 + error1
n2 = 93
avg2 = 6.713011
sd2 = 3.22479
error2 <- qnorm(.975) * sd2/sqrt(n2)
avg2 - error2
avg2 + error2
I can see from computing avg +/- error the extent to which the confidence intervals overlap or not; however, I wish to plot these two sets of data side by side with their means & confidence intervals to show in a nice graphic. I want to be able to label the x-axis as "data1"& "data2". I have looked through the boxplot functionality and can't seem to figure out how to do this when I am not using data per se but rather manually generating confidence intervals. I am not sure if boxplot is the proper function to use, but its in the ballpark of what I am looking for. Any advice/places to look/simple oversights on my part here?