Sorry here's the good code:

forestplot=function(mean,std,conf,threshold){
z=-qnorm((1-conf)/2)
CI.H <- mean+z*std # Calculate upper CI 
CI.L <- mean-z*std # Calculate lower CI 
plot(mean,1:length(mean),xlim=c(min(CI.L),max(CI.H)),pch=15,cex=1,
ylab="",xlab="mean & CIs",main="Forest plot")
arrows(mean,1:length(mean),CI.H,1:length(mean), angle=90,length=0.05)
arrows(mean,1:length(mean),CI.L,1:length(mean), angle=90,length=0.05)
abline(v=threshold,lty=3)
}


-- 
View this message in context: 
http://www.nabble.com/Forestplot-tp14404133p14462374.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to