estProfLogLik | R Documentation |
Computes the profile log-likelihood of l(π,theta;x) for a given value of theta, i.e. l(theta)=max_{π} l(π,theta;x).
estProfLogLik(data, theta, epsilon=10^(-4), trace=TRUE, initPi, maxit=1000)
data |
A matrix or table with counts. Rows represent subpopulations and columns the different categories of the data. Zero rows or columns are automaticly removed. |
theta |
The theta-value of which the profile log-likelihood is to be computed. |
epsilon |
Tolerance used in the iterations. Succeeding log-likelihood values need to be within epsilon for convergence. |
trace |
Logical. Whether parameter estimates and log-likelihood values should be printed to the screen while iterating. |
initPi |
Initial pi vector. |
maxit |
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.
dirmult
data(us) fit <- dirmult(us[[1]],epsilon=10^(-12),trace=FALSE) estProfLogLik(us[[1]],fit$theta*1.2,epsilon=10^(-12),trace=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.