- 貧血における赤血球の大小不同や悪性細胞の大小不同の定量の瞬発力
n.cell <- 10
r.mean <- 1
library(MCMCpack)
library(shape)
max.x <- 10
x <- matrix(runif(n.cell*2),ncol=2)*max.x
k <- 3
n.trial <- 20
color <-graycol(n = 50)
dr <- 0.05
par(mfcol=c(1,k))
for(i in 1:n.trial){
sds <- runif(k)*0.2 + 0.1
rs <- list()
for(j in 1:k){
ttl <- "sd=?"
rs[[j]] <- rnorm(n.cell,r.mean,sds[j])
emptyplot(xlim = c(0, max.x), ,main = ttl)
for(jj in 1:n.cell){
filledcircle(r1 = rs[[j]][jj], mid = x[jj,], col = shadepalette(endcol = "darkblue"))
}
par(ask=FALSE)
}
par(ask=TRUE)
sample.sds <- lapply(rs,sd)
for(j in 1:k){
ttl <- round(sample.sds[[j]],2)
emptyplot(xlim = c(0, max.x), ,main = ttl)
if(sample.sds[j] == max(unlist(sample.sds))){
for(jj in 1:n.cell){
filledcircle(r1 = rs[[j]][jj], mid = x[jj,], col = shadepalette(endcol = "darkblue"))
}
}else{
for(jj in 1:n.cell){
filledcircle(r1 = rs[[j]][jj], mid = x[jj,], col = shadepalette(endcol = "grey"))
}
}
par(ask=FALSE)
}
par(ask=TRUE)
}
par(mfcol=c(1,1))