Vis_image.hom: Visulization of the Benefits of Homogeneous T.st with Few...

Description Usage Arguments Details Value Examples

View source: R/manual R codes.r

Description

Visulization of difference of OSRs based on homogeneous T.st and E.st with few cases of w values, and on the condition of multiple ture success pairs, a, b.

Usage

1
Vis_image.hom(D, cols.mat, N.p, interval)

Arguments

D

a matrix of difference of OSRs between homogeneous T.st and E.st with rows (the length of w), columns (a,b pairs).

cols.mat

the same structure with D with keeping the corresponding color coded.

N.p

the number of patient treated.

interval

the interval of sequence of success rate a/b range from [0,1].

Details

Actually we've already calculated the OSRs based on the homogeneous T.st and E.st under the conditions w = -0.99,-0.98,...,0,0.01,...,0.98,0.99, N= 1,2,.,100, for (a,b) = (pa,pb)|pa,pb = 0.01,0.02,.,0.98,0.99,a>=b.

Each process of calculation is the same as the examples in the function OSR () with given N, one pair of (a, b), and w.

Differences with fixed N and w on the 5050 (a,b) pairs are coded colored in the triangle (gdata package used here), the blue indicates negatives and the red inicates positives.

We saved the simulated data based on E.st and T.st with data form .RData separately in this package, and we can load two datasets to make the image.

Value

trangle-contour image coded with blue-red color.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
load("mean.success.per.n.exp.100.201.RData")
load("mean.success.per.n.wpbeta.100.201.RData")
library(gdata)
N <- 100
interval=0.01
ps<-combn(seq(0,1,by=interval),2)
w<-seq(from=-1,to=1,by=0.01)
Difs<-array(0,c(length(w),length(ps[1,]),N))
   for(i in 1:N){
     Difs[,,i]<-t(t(mean.success.per.n.wpbeta[,,i+1])-mean.success.per.n.exp[i+1,])
   }
   w.id<-c(21,61,141,181)
   N.id<-c(10,30,100)
   Difs.<-Difs[w.id,,N.id]
   cols<-color_scale(obs=c(Difs.),neg.cols=c("blue","white"),pos.cols=c("white","red"))
cols.<-array(cols,c(dim(Difs.)))
par(mfrow=c(length(N.id),length(w.id)),lwd=2)
for(i in seq_along(N.id)){
   N.p<-N.id[i]
   D<-Difs.[,,i]
   cols.mat<-cols.[,,i]
   Vis_image.hom(D=D,cols.mat=cols.mat,N.p=N.p,interval=interval)
}

ryamada22/SelfDecABP documentation built on May 28, 2019, 10:44 a.m.