k.continuous=1
design_x=matrix(c(25, -1, -1,-1, -1 ,
25, -1, -1, -1, 1,
25, -1, -1, 1, -1,
25, -1, -1, 1, 1,
25, -1, 1, -1, -1,
25, -1, 1, -1, 1,
25, -1, 1, 1, -1,
25, -1, 1, 1, 1,
25, 1, -1, 1, -1,
25, 1, 1, -1, -1,
25, 1, 1, -1, 1,
25, 1, 1, 1, -1,
25, 1, 1, 1, 1,
38.9479, -1, 1, 1, -1,
34.0229, -1, 1, -1, -1,
35.4049, -1, 1, -1, 1,
37.1960, -1, -1, 1, -1,
33.0884, -1, 1, 1, 1),nrow=18,ncol=5,byrow = TRUE)
hfunc.temp = function(y) {c(y,y[4]*y[5],1);}; # y -> h(y)=(y1,y2,y3,y4,y5,y4*y5,1)
link.temp="logit"
design_p=c(0.0848, 0.0875, 0.0410, 0.0856, 0.0690, 0.0515,
0.0901, 0.0845, 0.0743, 0.0356, 0.0621, 0.0443,
0.0090, 0.0794, 0.0157, 0.0380, 0.0455, 0.0022)
det.design=4.552715e-06
paras_lowerbound<-c(0.25,1,-0.3,-0.3,0.1,0.35,-8.0)
paras_upperbound<-c(0.45,2,-0.1,0.0,0.4,0.45,-7.0)
gjoint_b<- function(x) {
Func_b<-1/(prod(paras_upperbound-paras_lowerbound))
##the prior distributions are follow uniform distribution
return(Func_b)
}
GLM_Exact_Design(k.continuous=k.continuous,design_x=design_x,
design_p=design_p,det.design=det.design,p=7,ForLion=FALSE,joint_Func_b=gjoint_b,
Lowerbounds=paras_lowerbound, Upperbounds=paras_upperbound,rel.diff=0,L=1,
N=100,hfunc=hfunc.temp,link=link.temp)
Run the code above in your browser using DataLab