Market data and model simulation functionality based on the data generating process induced by the market model specifications.
simulate_data(
model_type_string,
nobs = NA_integer_,
tobs = NA_integer_,
alpha_d = NA_real_,
beta_d0 = NA_real_,
beta_d = NA_real_,
eta_d = NA_real_,
alpha_s = NA_real_,
beta_s0 = NA_real_,
beta_s = NA_real_,
eta_s = NA_real_,
gamma = NA_real_,
beta_p0 = NA_real_,
beta_p = NA_real_,
sigma_d = 1,
sigma_s = 1,
sigma_p = 1,
rho_ds = 0,
rho_dp = 0,
rho_sp = 0,
seed = NA_integer_,
price_generator = function(n) stats::rnorm(n = n),
control_generator = function(n) stats::rnorm(n = n),
verbose = 0
)
# S4 method for ANY
simulate_data(
model_type_string,
nobs = NA_integer_,
tobs = NA_integer_,
alpha_d = NA_real_,
beta_d0 = NA_real_,
beta_d = NA_real_,
eta_d = NA_real_,
alpha_s = NA_real_,
beta_s0 = NA_real_,
beta_s = NA_real_,
eta_s = NA_real_,
gamma = NA_real_,
beta_p0 = NA_real_,
beta_p = NA_real_,
sigma_d = 1,
sigma_s = 1,
sigma_p = 1,
rho_ds = 0,
rho_dp = 0,
rho_sp = 0,
seed = NA_integer_,
price_generator = function(n) stats::rnorm(n = n),
control_generator = function(n) stats::rnorm(n = n),
verbose = 0
)
simulate_model(
model_type_string,
simulation_parameters,
seed = NA,
verbose = 0,
...
)
# S4 method for ANY
simulate_model(
model_type_string,
simulation_parameters,
seed = NA,
verbose = 0,
...
)
Model type. It should be among equilibrium_model
,
diseq_basic
, diseq_directional
,
diseq_deterministic_adjustment
, and diseq_stochastic_adjustment
.
Number of simulated entities.
Number of simulated dates.
Price coefficient of demand.
Constant coefficient of demand.
Coefficients of exclusive demand controls.
Demand coefficients of common controls.
Price coefficient of supply.
Constant coefficient of supply.
Coefficients of exclusive supply controls.
Supply coefficients of common controls.
Price equation's stability factor.
Price equation's constant coefficient.
Price equation's control coefficients.
Demand shock's standard deviation.
Supply shock's standard deviation.
Price equation shock's standard deviation.
Demand and supply shocks' correlation coefficient.
Demand and price shocks' correlation coefficient.
Supply and price shocks' correlation coefficient.
Pseudo random number generator seed.
Pseudo random number generator callback for prices. The default generator is \(N(2.5, 0.25)\).
Pseudo random number generator callback for non-price controls. The default generator is \(N(2.5, 0.25)\).
Verbosity level.
List of parameters used in model simulation. See the
simulate_data
function for details.
Additional parameters to be passed to the model's constructor.
simulate_data
: The simulated data.
simulate_model
: The simulated model.
simulate_data
: Simulate model data.
simulate_model
: Simulate model.