formula,market_model-method {markets}R Documentation

Market model formula

Description

Market model formula

Usage

## S4 method for signature 'market_model'
formula(x)

Arguments

x

A market model object.

Details

Market model formulas adhere to the following specification:

quantity | price | subject | time ~ demand | supply

where

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.

Value

The model's formula

Examples


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)


[Package markets version 1.1.5 Index]