data(gammarus)
frair_responses() # See what is available
RcppParallel::setThreadOptions(numThreads = 2)
# A typeII fit
outII <- frair_fit(eaten~density, data=gammarus, response='rogersII',
start=list(a = 1.2, h = 0.015), fixed=list(T=40/24))
if (FALSE) {
outIIb <- frair_boot(outII) # Slow
confint(outIIb)
# Illustrate bootlines
plot(outIIb, xlim=c(0,30), type='n', main='All bootstrapped lines')
lines(outIIb, all_lines=TRUE)
points(outIIb, pch=20, col=rgb(0,0,0,0.2))
# Illustrate bootpolys
plot(outIIb, xlim=c(0,30), type='n', main='Empirical 95 percent CI')
drawpoly(outIIb, col=rgb(0,0.5,0))
points(outIIb, pch=20, col=rgb(0,0,0,0.2))
}
Run the code above in your browser using DataLab