data(bssbsb)
bssbsb <- bssbsb[,1:50]
xodist <- convertxoloc(find.breaks(bssbsb, chr=1))
# plot a rough log likelihood curve
if (FALSE) out <- fitGamma(xodist, nu=seq(1, 19, by=2))
out <- fitGamma(xodist, nu=seq(1, 19, by=2), tol=0.001)
plot(out, type="l", lwd=2)
# get MLE
if (FALSE) mle <- fitGamma(xodist, lo=8, hi=12)
mle <- fitGamma(xodist, lo=8, hi=12, tol=0.001)
mle
abline(v=mle[1], h=mle[2], col="blue", lty=2)
# get MLE and SE
if (FALSE) mle <- fitGamma(xodist, lo=9.5, hi=10.5, se=TRUE)
mle <- fitGamma(xodist, lo=9.5, hi=10.5, se=TRUE, tol=0.001)
mle
# get MLE and 10^1.5 support interval
if (FALSE) int <- fitGamma(xodist, lo=1, hi=20, supint=TRUE)
int <- fitGamma(xodist, lo=1, hi=20, supint=TRUE, tol=0.001)
int
abline(v=mle[2:3,1], h=mle[2:3,2], col="red", lty=2)
Run the code above in your browser using DataLab