llmnl(bayesm) | R Documentation |
llmnl
evaluates log-likelihood for the multinomial logit model.
llmnl(y, X, beta)
y |
n x 1 vector of obs on y (1,..., p) |
X |
n*p x k Design matrix (use createX to make |
beta |
k x 1 coefficient vector |
Let mu_i=X_i%*%beta, then Pr(y=j) = exp(mu_j)/Sum_i(mu_i).
X_i is the submatrix of X corresponding to the
ith observation. X has n*p rows.
Use createX
to create X.
value of log-likelihood (sum of log prob of observed multinomial outcomes).
This routine is a utility routine that does not check the input arguments for proper dimensions and type.
Peter Rossi, Graduate School of Business, University of Chicago, Peter.Rossi@ChicagoGsb.edu.
For further discussion, see Bayesian Statistics and Marketing
by Allenby, McCulloch, and Rossi.
http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html
## ## Not run: ll=llmnl(y,X,beta)