conc <- c(0,2^(-6:3),Inf)
hpar <- c(1,3,0,75)
response <- evalHillModel(conc, hpar) + rnorm(length(conc),sd=7.5)
hfit4p <- fitHillModel(conc,response,c(1,2,3,4),start=c(0.5,1,0,100))
hfit3p <- fitHillModel(conc,response,c(1,2,4),start=c(0.5,1,0,100))
aic4p <- estimateBIC(residuals(hfit4p),4)
aic3p <- estimateBIC(residuals(hfit3p),3)
Run the code above in your browser using DataLab