estProfLogLik: Profile log-likelihood of Dirichlet-multinomial model

View source: R/dirmult.R

estProfLogLikR Documentation

Profile log-likelihood of Dirichlet-multinomial model

Description

Computes the profile log-likelihood of l(π,theta;x) for a given value of theta, i.e. l(theta)=max_{π} l(π,theta;x).

Usage

estProfLogLik(data, theta, epsilon=10^(-4), trace=TRUE, initPi, maxit=1000)

Arguments

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.

Value

Gives a list of components (similar to output from dirmult where loglik and lambda (the Lagrange multiplier) are the most interesting.

See Also

dirmult

Examples

data(us)
fit <- dirmult(us[[1]],epsilon=10^(-12),trace=FALSE)
estProfLogLik(us[[1]],fit$theta*1.2,epsilon=10^(-12),trace=FALSE)

dirmult documentation built on March 21, 2022, 5:05 p.m.