[英]Odds Ratio and 95% Confidence Intervals for Binary Matched Outcome after Propensity Score Matching
[英]Plotting odds ratio's and 95% confidence intervals
或多或少,使用本地R:
### artificial data ####
set.seed(321)
bs<-sort(runif(20,-2,2))
sd<-runif(20,1,2)
li1<-bs-2*sd
li2<-bs+2*sd
dat<-data.frame(li1,bs,li2)
pos<-c(1:5,7:11,13:17,19:23)
xl=range(dat)
plot(1,type="n",xlim=xl,ylim=c(1,25),ylab="",frame.plot = F,yaxt = "n",xlab="lr")
for (i in 1:length(dat[,1])){
lines(dat[i,],rep(pos[i],3),lty=pos[i]%%6,pch="|",type = "b",cex = .5)
}
abline(v=0,lty=3)
points(dat[,2],pos,pch="*",cex=.8)
text(-2,pos[c(5,10,15,20)]+.95,paste("Text",1:4),cex=.8)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.