formula,market_model-method | R Documentation |
Market model formula.
## S4 method for signature 'market_model' formula(x)
x |
A market model object. |
Market model formulas adhere to the following specification:
quantity | price | subject | time ~ demand | supply
where
quantity The model's traded (observed) quantity variable.
price The model's price variable.
quantity The model's subject (e.g. firm) identification variable.
quantity The model's time identification variable.
demand The right hand side of the model's demand equation.
supply The right hand side of the model's supply equation.
The diseq_stochastic_adjustment
additionally specify
price dynamics by appending the right hand side of the equation at the end
of the formula, i.e.
quantity | price | subject | time ~ demand | supply | price_dynamics
The left hand side part of the model formula specifies the elements that are needed for initializing the model. The market models of the package prepare the data based on these four variables using their respective identification assumptions. See market model classes for more details.
The function provides access to the formula used in model initialization.
The model's formula
model <- simulate_model( "diseq_stochastic_adjustment", list( # observed entities, observed time points nobs = 500, tobs = 3, # demand coefficients alpha_d = -0.1, beta_d0 = 9.8, beta_d = c(0.3, -0.2), eta_d = c(0.6, -0.1), # supply coefficients alpha_s = 0.1, beta_s0 = 6.1, beta_s = c(0.9), eta_s = c(-0.5, 0.2), # price equation coefficients gamma = 1.2, beta_p0 = 3.1, beta_p = c(0.8) ), seed = 31 ) # access the model's formula formula(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.