powered by
simnhlogit simulates from the non-homothetic logit model
simnhlogit
simnhlogit(theta, lnprices, Xexpend)
coefficient vector
n x p array of prices
n x k array of values of expenditure variables
a list containing:
n x 1 vector of multinomial outcomes (1, …, p)
expenditure variables
price array
coefficients
n x p array of choice probabilities
This routine is a utility routine that does not check the input arguments for proper dimensions and type.
For details on parameterization, see llnhlogit.
llnhlogit
For further discussion, see Bayesian Statistics and Marketing by Rossi, Allenby and McCulloch, Chapter 4. http://www.perossi.org/home/bsm-1
## N=1000 p=3 k=1 theta = c(rep(1,p),seq(from=-1,to=1,length=p),rep(2,k),.5) lnprices = matrix(runif(N*p),ncol=p) Xexpend = matrix(runif(N*k),ncol=k) simdata = simnhlogit(theta,lnprices,Xexpend)
Run the code above in your browser using DataLab