0

In my data, I have 5 variables. The first (“groups”) names various diseases. The other four show STDs and p-values each with a value for the before-state (unadj) and the after-state (eb), i.e. STD_unadj, STD_eb, p.value_unadj and p.value_eb.

I would like to construct a figure that contains of two dot graphs (one for STD and another one for p-value) with each dot graph showing both the STD-values (p-values) before and after. As this is difficult for me to describe and therefore probably very hard for you to understand, I would have loved to attach a picture of a graph which looks exactly as I would like mine to look like. Unfortunately I am unable to do so. Therefore here is a link to a paper which conains such a graph on p.17:

http://pan.oxfordjournals.org/content/early/2011/10/15/pan.mpr025.full.pdf+html enter image description here

The only thing I could manage to do in R so far is to create 4 separate graphs:

dotchart(x=STD_unadj, labels=groups, xlab="standardized difference in means",pch=19, lty=3, cex=0.7)
dotchart(x=STD_eb, labels=groups, xlab="standardized difference in means",pch=1, lty=3, cex=0.7)
dotchart(x=p.value_unadj, labels=groups, xlab="p-value: difference of means test",pch=19, lty=3, cex=0.7)
dotchart(x=p.value_eb, labels=groups, xlab="p-value: difference of means test",pch=19, lty=3, cex=0.7)

Do you have any idea on how I can combine these 4 graphs to one figure that looks like the example on my uploaded picture? Or should I begin and proceed completely different?

Thanks a lot for your help and advice!

Victoria

zx8754
  • 52,746
  • 12
  • 114
  • 209
  • Paper is not accessible, take a screenshot, save as image and post it to free image sharing site like imgur.com, then paste the link in your post. Also provide [reproducible example data](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – zx8754 Mar 06 '15 at 12:26
  • Thanks a lo for your advice! Here you can see the graph: http://imgur.com/QCizk7P – Victoria Lnrth Mar 13 '15 at 12:31
  • And this is how my dataset looks like: groups = c("ECG_AIDS/HIV", "ECG_Alcohol abuse", "ECG_Blood loss anemia", "ECG_Cardiac arrhythmias ", "ECG_Chronic pulmonary disease") STD_unadj = c(-0.44, -0.88, -0.416, -0.103,0.723) STD_eb = c(0, 0, 0, 0, 0) p.value_unadj = c(0.003, 0.023, 0.025, 0.023, 0.029) p.value_eb = c(1.0, 1.0, 1.0, 1.0, 1.0) df=data.frame(groups, STD_unadj, STD_eb, p.value_unadj, p.value_eb) df Thank you for your help. – Victoria Lnrth Mar 13 '15 at 14:25

1 Answers1

0

I will give it a wild guess. I think what you ask here is:

plot(rnorm(100), type = "p")
par(new = T)
points(rnorm(50), pch = 2)

Simplified example.

statespace
  • 1,644
  • 17
  • 25