Description Usage Arguments Details Value Examples
View source: R/manual R codes.r
Visulization of difference of OSRs based on heterogeneous T.st and E.st on the condition of multiple ture success pairs, a, b.
1 | Vis_image.het(het.D, U.v, interval, col.v)
|
het.D |
a vector of the difference of OSRs between heterogenous T.st and E.st. |
U.v |
the value of parameter of W distribution |
interval |
the interval of sequence of success rate a/b range from [0,1]. |
col.v |
a vector of the color elements coded re-scaled by raw data points via color_scale(). |
".RData" on the conditions that,N= 1,2,.,100,for (a,b) = (a,b)|a,b=0.05,0.1,.,0.90,0.95,a>=b.
w generated from distribution function W() with various parameters u=v=5, 30, 70 or 461.
The trangle image with colored contour.
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 | N<-50
interval<-0.05
ps<-combn(seq(0,1,by=interval),2)
u=v=c(5,30,70,461)
load("mean.success.per.n.exp.100.ps210.RData")
exp.50<-mean.success.per.n.exp[N+1,]
load("het.OSRs.RData")
str(het.OSRs)
het<-sapply(het.OSRs,function(x)x[,N+1])
het.dif<-het-exp.50
cols<-color_scale(c(het.dif),neg.cols=c("blue","white"),pos.cols=c("white","red"))
par(mfrow=c(1,1),mar=c(3,3,3,3))
image(matrix(seq(0,1,length.out=length(c(het.dif))),ncol=1),col=cols[order(c(het.dif))], xlab=" ", ylab=" ",xaxt="n",yaxt="n")
axis(3,at=c(0.2),labels=c("Negatives"),cex.axis=1.4,font=4,las=1,lwd=4,tick=FALSE,line=-0.2)
axis(3,at=c(0.75),labels=c("Positives"),cex.axis=1.4,font=4,las=1,lwd=4,tick=FALSE,line=-0.2)
se<-range(c(het.dif))
axis(3,at=c(0,0.5,1),labels=round(c(min(het.dif),median(het.dif),max(het.dif)),3),cex.axis=1.1,font=4,las=1,line=-0.2,lwd=4,col.ticks="green",col="green")
colbar<-seq(0,1,length.out=length(cols))
axis(3,at=colbar[length(which(het.dif<0))],labels=c("0"),cex.axis=1.4,font=4,las=1,lwd=4,line=-0.2,col.ticks="green")
cols.mat<-matrix(cols, ncol=ncol(het.dif), nrow=nrow(het.dif))
library(gdata)
par(mfrow=c(1,length(u)))
for(i in seq_along(u)){
het.D<-het.dif[,i]
U.v<-u[i]
col.v<-cols.mat[,i]
Vis_image.het(het.D=het.D,U.v=U.v, interval=interval,col.v=col.v)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.