This function calculates the negative log-likelihood using the expectation maximization algorithm with Nelder-Mead numerical optimization and beta-binomial distribution.
Arguments
- parmlist
A list containing initial alpha, mean, and variance.
- xm
Matrix where the first column is total coverage and the second is the count of base A or B.
- niter
Max number of iterates.
- epsilon
Epsilon value for convergence tolerance. When the absolute delta log-likelihood is below this value, convergence is reached.
- trunc
List of two values representing the lower and upper bounds, $c_L$ and $c_U$.
- type
String indicating "Free" or "Fixed".