simnhlogit | R Documentation |
simnhlogit
simulates from the non-homothetic logit model.
simnhlogit(theta, lnprices, Xexpend)
theta |
coefficient vector |
lnprices |
|
Xexpend |
|
For details on parameterization, see llnhlogit
.
A list containing:
y |
|
Xexpend |
expenditure variables |
lnprices |
price array |
theta |
coefficients |
prob |
|
This routine is a utility routine that does not check the input arguments for proper dimensions and type.
Peter Rossi, Anderson School, UCLA, perossichi@gmail.com.
For further discussion, see Chapter 4, Bayesian Statistics and Marketing by Rossi, Allenby, and McCulloch.
llnhlogit
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.