I'm having some dotchart issues.
I know exactly what data I want represented but I cannot seem to create the required in R.
I saw an example that used ggplot2 Dotplot with error bars, two series, light jitter
And I have all the data I want. e.g. (replace x with 1-7 for each of my seven models) predf.mxdistrst.agree # A visual comparison of the predicted values 1 (low distrust) and 4 (high distrust)
lower.mxdistrst.agree # we want to take the corresponding lower confidence interval for 1 (low distrust) and 4 (high distrust)
upper.mxdistrst.agree # we want to take the corresponding higher confidence interval for 1 (low distrust) and 4 (high distrust)
Should I just rbind the data together and create manually? Does anyone have any coding suggestions as to how I should do this?
To provide the data from one model I want to include in the dotchart:
predf.m3distrst.agree # A visual comparison of the values 1 (low distrust)and 4 (high trust)
## 1 2 3 4
0.3760939 0.4879099 0.6009491 0.7041654
lower.m3distrst.agree # we want to take the corresponding lower confidence
interval for 1 (low distrust) and 4 (high distrust)
## 1 2 3 4
## 0.2691181 0.4146136 0.5410089 0.6270332
upper.m3distrst.agree # we want to take the corresponding higher confidence
interval for 1 (low distrust) and 4 (high distrust)
## 1 2 3 4
## 0.4830697 0.5612062 0.6608894 0.7812975
I have created barplots for each model, but I want to put all together in dotchart format. So there are 7 models in total and we want to reflect everything in 1 dotchart/ggplot with dashed linetype.
Thank you for your help!