A C++ function to perform a parameter estimation for the sgRNA-level test. It will estimate two different parameters `phat` and `vhat,` and we assume input count data follows the beta-binomial distribution. Dr. Keith Baggerly initially implemented this code in Matlab, and it has been rewritten it in C++ for the speed-up.
fit_ab(xvec, nvec)
a matrix contains sgRNA read counts.
a vector contains the library size.