llnhlogit {bayesm} | R Documentation |
Evaluate Log Likelihood for non-homothetic Logit Model
Description
llnhlogit
evaluates log-likelihood for the Non-homothetic Logit model.
Usage
llnhlogit(theta, choice, lnprices, Xexpend)
Arguments
theta |
parameter vector (see details section) |
choice |
|
lnprices |
|
Xexpend |
|
Details
Non-homothetic logit model,
tau is the scale parameter of extreme value error distribution.
solves
.
.
.
Structure of theta vector:
alpha: vector of utility intercepts.
kappaStar: vector of utility rotation parms expressed on natural log scale.
gamma: – expenditure variable coefs.
tau: – logit scale parameter.
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, Anderson School, UCLA, perossichi@gmail.com.
References
For further discussion, see Chapter 4, Bayesian Statistics and Marketing by Rossi, Allenby, and McCulloch.
See Also
Examples
N=1000; p=3; k=1
theta = c(rep(1,p), seq(from=-1,to=1,length=p), rep(2,k), 0.5)
lnprices = matrix(runif(N*p), ncol=p)
Xexpend = matrix(runif(N*k), ncol=k)
simdata = simnhlogit(theta, lnprices, Xexpend)
## evaluate likelihood at true theta
llstar = llnhlogit(theta, simdata$y, simdata$lnprices, simdata$Xexpend)