1\name{llnhlogit}
2\alias{llnhlogit}
3\concept{multinomial logit}
4\concept{non-homothetic utility}
5
6\title{Evaluate Log Likelihood for non-homothetic Logit Model}
7
8\description{
9\code{llnhlogit} evaluates log-likelihood for the Non-homothetic Logit model.
10}
11
12\usage{llnhlogit(theta, choice, lnprices, Xexpend)}
13
14\arguments{
15  \item{theta   }{ parameter vector (see details section) }
16  \item{choice  }{ \eqn{n x 1} vector of choice (1,\ldots,p) }
17  \item{lnprices}{ \eqn{n x p}  array of log-prices}
18  \item{Xexpend }{ \eqn{n x d} array of vars predicting expenditure }
19}
20
21\details{
22  Non-homothetic logit model, \eqn{Pr(i) = exp(tau v_i) / sum_j exp(tau v_j)} \cr
23
24  \eqn{v_i = alpha_i - e^{kappaStar_i}u^i - lnp_i} \cr
25  tau is the scale parameter of extreme value error distribution.\cr
26  \eqn{u^i} solves \eqn{u^i = psi_i(u^i)E/p_i}.\cr
27  \eqn{ln(psi_i(U)) = alpha_i - e^{kappaStar_i}U}. \cr
28  \eqn{ln(E) = gamma'Xexpend}.\cr
29
30  Structure of theta vector: \cr
31  alpha: \eqn{p x 1} vector of utility intercepts.\cr
32  kappaStar: \eqn{p x 1} vector of utility rotation parms expressed on natural log scale. \cr
33  gamma: \eqn{k x 1} -- expenditure variable coefs.\cr
34  tau: \eqn{1 x 1} -- logit scale parameter.\cr
35}
36
37\value{Value of log-likelihood (sum of log prob of observed multinomial outcomes).}
38
39\section{Warning}{
40This routine is a utility routine that does \strong{not} check the input arguments for proper dimensions and type.
41}
42
43\author{Peter Rossi, Anderson School, UCLA, \email{perossichi@gmail.com}.}
44
45\references{For further discussion, see Chapter 4, \emph{Bayesian Statistics and Marketing} by Rossi, Allenby, and McCulloch. \cr \url{http://www.perossi.org/home/bsm-1}}
46
47\seealso{\code{\link{simnhlogit}}}
48
49\examples{
50N=1000; p=3; k=1
51theta = c(rep(1,p), seq(from=-1,to=1,length=p), rep(2,k), 0.5)
52lnprices = matrix(runif(N*p), ncol=p)
53Xexpend = matrix(runif(N*k), ncol=k)
54simdata = simnhlogit(theta, lnprices, Xexpend)
55
56## evaluate likelihood at true theta
57llstar = llnhlogit(theta, simdata$y, simdata$lnprices, simdata$Xexpend)
58}
59
60\keyword{models}