-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathLTBR.R
30 lines (30 loc) · 904 Bytes
/
LTBR.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
LTBR <- function(b,se,out="p2d.png")
{
png(out,res=300,width=18,height=10,units="in")
par(mfrow=c(2,1))
data <- data.frame(b)
x <- data[[1]]
plot(data[[2]]~x,ylim=c(-0.5,0.5),col="blue",xlab="",ylab="Effect size",pch=15,axes=FALSE)
points(data[[3]]~x,col="orange",pch=17)
points(data[[4]]~x,col="red",pch=19)
title("MS-LTBR-TNFB")
axis(2)
data <- data.frame(se)
x <- data[[1]]
plot(data[[2]]~x,ylim=c(0,0.5),col="blue",xlab="Position",ylab="Standard error",pch=15,axes=FALSE)
points(data[[3]]~x,col="orange",pch=17)
points(data[[4]]~x,col="red",pch=19)
legend("topleft",
legend = c("MS","LTBR","TNFB"),
col = c("blue","orange","red"),
pch = c(15,17,19),
bty = "n",
pt.cex = 2,
cex = 1.2,
text.col = "black",
horiz = FALSE,
inset = c(0.1, 0.1))
axis(1,at=x,tick=TRUE)
axis(2)
dev.off()
}