Estimated market quantities.

demanded_quantities(fit, model, parameters)

# S4 method for missing,market_model,ANY
demanded_quantities(model, parameters)

supplied_quantities(fit, model, parameters)

# S4 method for missing,market_model,ANY
supplied_quantities(model, parameters)

# S4 method for market_fit,missing,missing
demanded_quantities(fit)

# S4 method for market_fit,missing,missing
supplied_quantities(fit)

Arguments

fit

A fitted model object.

model

A model object.

parameters

A vector of model's parameters.

Value

A vector with the demanded quantities evaluated at the given parameter vector.

Details

Calculates and returns the estimated demanded or supplied quantities for each observation at the passed vector of parameters.

Functions

  • demanded_quantities: Estimated demanded quantities.

  • supplied_quantities: Estimated supplied quantities.

Examples

# \donttest{
fit <- diseq_basic(
  HS | RM | ID | TREND ~
  RM + TREND + W + CSHS + L1RM + L2RM + MONTH |
    RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH,
  fair_houses(),
  correlated_shocks = FALSE
)
#> Warning: Using formula(x) is deprecated when x is a character vector of length > 1.
#>   Consider formula(paste(x, collapse = " ")) instead.
#> Warning: Using formula(x) is deprecated when x is a character vector of length > 1.
#>   Consider formula(paste(x, collapse = " ")) instead.

# get estimated demanded and supplied quantities
head(cbind(
  demanded_quantities(fit),
  supplied_quantities(fit)
))
#>       D_HS     S_HS
#> 1 200.1755 106.8530
#> 2 237.2266 136.5007
#> 3 246.2204 136.5028
#> 4 250.3883 131.8731
#> 5 253.2939 125.8008
#> 6 257.9073 121.9285
# }