
Computes the profile log-likelihood of
estProfLogLik(data, theta, epsilon=10^(-4), trace=TRUE, initPi, maxit=1000)
A matrix or table with counts. Rows represent subpopulations and columns the different categories of the data. Zero rows or columns are automaticly removed.
The theta-value of which the profile log-likelihood is to be computed.
Tolerance used in the iterations. Succeeding log-likelihood values need to be within epsilon for convergence.
Logical. Whether parameter estimates and log-likelihood values should be printed to the screen while iterating.
Initial pi vector.
Maximum number of iterations. Default is 1000 and will often not be envoked, but if theta is to extreme compared to the MLE of theta the log-likelihood may misbehave near theta.
Gives a list of components (similar to output from
dirmult
where loglik
and lambda
(the
Lagrange multiplier) are the most interesting.
# NOT RUN {
data(us)
fit <- dirmult(us[[1]],epsilon=10^(-12),trace=FALSE)
estProfLogLik(us[[1]],fit$theta*1.2,epsilon=10^(-12),trace=FALSE)
# }
Run the code above in your browser using DataLab