Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

simnhlogit

Simulate from Non-homothetic Logit Model


Description

simnhlogit simulates from the non-homothetic logit model.

Usage

simnhlogit(theta, lnprices, Xexpend)

Arguments

theta

coefficient vector

lnprices

n x p array of prices

Xexpend

n x k array of values of expenditure variables

Details

For details on parameterization, see llnhlogit.

Value

A list containing:

y

n x 1 vector of multinomial outcomes (1,…,p)

Xexpend

expenditure variables

lnprices

price array

theta

coefficients

prob

n x p array of choice probabilities

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.
http://www.perossi.org/home/bsm-1

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)

bayesm

Bayesian Inference for Marketing/Micro-Econometrics

v3.1-4
GPL (>= 2)
Authors
Peter Rossi <perossichi@gmail.com>
Initial release
2019-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.