View source: R/PrepareSimulationData.R
PrepareSimulationData | R Documentation |
Prepare Data for WTP simulation
PrepareSimulationData(object, policies, nsims = 30, class = "class1")
object |
an object of class 'mdcev' |
policies |
list containing price_p with additive price increases, and dat_psi_p with new psi data |
nsims |
Number of simulation draws to use for parameter uncertainty |
class |
The class number for Latent Class models. |
A list with individual-specific data (df_indiv) and common data (df_common) and n_classes for number of classes and model_num for model type
data(data_rec, package = "rmdcev")
data_rec <- mdcev.data(data_rec, subset = id <= 500, id.var = "id",
alt.var = "alt", choice = "quant")
mdcev_est <- mdcev( ~ 0, data = data_rec,
model = "hybrid0", algorithm = "MLE",
std_errors = "mvn")
policies <- CreateBlankPolicies(npols = 2, mdcev_est,
price_change_only = TRUE)
df_sim <- PrepareSimulationData(mdcev_est, policies)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.