[SOLVED] CS ############################################################################

$25

File Name: CS_############################################################################.zip
File Size: 744.18 KB

5/5 - (1 vote)

############################################################################
# Create initial cpf with AC[l,u] endpoints by choosing coverage
# probability from highest acceptance curve with minimal span.

cpf.matrix <- matrix(NA,ncol=3,nrow=iter+1)colnames(cpf.matrix)<-c(“p”,”low”,”upp”)for (i in 1:(iter/2+1)){p <- (i-1)/iterbin <- dbinom(0:n,n,p)x <- 0:npmf <- cbind(x,bin)# Binomial probabilities ordered in descending sequencepmf <- pmf[order(-pmf[,2],pmf[,1]),]pmf <- data.frame(pmf)# Select the endpoints (l,u) such that AC[l,u] will# be at least equal to LEVEL. The cumulative sum of# the ordered pmf will identify when this occurs.m.row<- min(which((cumsum(pmf[,2])>=level)==TRUE))
low.val <-min(pmf[1:m.row,][,1])upp.val <-max(pmf[1:m.row,][,1])cpf.matrix[i,] <- c(p,low.val,upp.val) }

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS ############################################################################
$25