# NOT RUN {
K<-2 #number of random coefficients
Xlin_example <- c("price", "x1", "x2", "x3", "x4", "x5")
Xexo_example <- c("x1", "x2", "x3", "x4", "x5")
Xrandom_example <- paste0("x",1:K)
instruments_example <- paste0("iv",1:10)
data <- get.BLP.dataset(nmkt = 25,
nbrn = 20,
Xlin = Xlin_example,
Xexo = Xexo_example,
Xrandom = Xrandom_example,
instruments = instruments_example,
true.parameters = list(Xlin.true.except.price = rep(0.2,5),
Xlin.true.price = -0.2,
Xrandom.true = rep(2,K),
instrument.effects = rep(2,10),
instrument.Xexo.effects = rep(1,5)),
price.endogeneity = list( mean.xi = -2,
mean.eita = 0,
cov = cbind( c(1,0.7), c(0.7,1))),
printlevel = 0, seed = 234234 )
# }
Run the code above in your browser using DataLab