simulate_BLP_dataset {BLPestimatoR}R Documentation

This function creates a simulated BLP dataset.

Description

This function creates a simulated BLP dataset.

Usage

simulate_BLP_dataset(
  nmkt,
  nbrn,
  Xlin,
  Xexo,
  Xrandom,
  instruments,
  true.parameters = list(),
  price.endogeneity = list(mean.xi = -2, mean.eita = 0, cov = cbind(c(1, 0.7), c(0.7,
    1))),
  printlevel = 1,
  seed
)

Arguments

nmkt

number of markets

nbrn

number of products

Xlin

character vector specifying the set of linear variables

Xexo

character vector specifying the set of exogenous variables (subset of Xlin)

Xrandom

character vector specifying the set of random coefficients (subset of Xlin)

instruments

character vector specifying the set of instrumental variables

true.parameters

list with parameters of the DGP

Xlin.true.except.price

"true" linear coefficients in utility function except price

Xlin.true.price

"true" linear price coefficient in utility function

Xrandom.true

"true" set of random coefficients

instrument.effects

"true" coefficients of instrumental variables to explain endogenous price

instrument.Xexo.effects

"true" coefficients of exogenous variables to explain endogenous price

price.endogeneity

list with arguments of the multivariate normal distribution

mean.xi

controls for the mean of the error term in the utility function

mean.eita

controls for the mean of the error term in the price function

cov

controls for the covariance of xi and eita

printlevel

0 (no output) 1 (summary of generated data)

seed

seed for the random number generator

Details

The dataset is balanced, so every market has the same amount of products. Only unobserved heterogeneity can be considered. Variables that enter the equation as a Random Coefficient or exogenously must be included in the set of linear variables. The parameter.list argument specifies the "true" effect on the individual utility for each component. Prices are generated endogenous as a function of exogenous variables and instruments, where the respective effect sizes are specified in instrument.effects and instrument.Xexo.effects. Error terms xi and eita are drawn from a multivariate normal distribution, whose parameters can be set in price.endogeneity. Market shares are generated by MLHS integration rule with 10000 nodes.

Value

Returns a simulated BLP dataset.

Examples

K<-2 #number of random coefficients


[Package BLPestimatoR version 0.3.4 Index]