llmnl {bayesm} | R Documentation

## Evaluate Log Likelihood for Multinomial Logit Model

### Description

`llmnl` evaluates log-likelihood for the multinomial logit model.

### Usage

    llmnl(beta,y, X)

### Arguments

`beta` | k x 1 coefficient vector
`y` | n x 1 vector of obs on y (1,..., p)
`X` | n*p x k Design matrix (use `createX` to make)

### Details

Let mu_i=X_i β, then Pr(y_i=j) = exp(mu_{i,j})/sum_kexp(mu_{i,k}).
X_i is the submatrix of X corresponding to the ith observation. X has n*p rows.

Use `createX` to create X.

### Value

value of log-likelihood (sum of log prob of observed multinomial outcomes).

### Warning

This routine is a utility routine that does not check the input arguments for proper dimensions and type.

### Author(s)

Peter Rossi, Graduate School of Business, University of Chicago, Peter.Rossi@ChicagoGsb.edu.

### References

For further discussion, see Bayesian Statistics and Marketing by Rossi, Allenby and McCulloch.
http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html

### See Also

`createX`, `rmnlIndepMetrop`

### Examples

    ##
    ## Not run: ll=llmnl(beta,y,X)

[Package bayesm version 2.0-8 Index]