Learn R Programming

diseq (version 0.3.1)

market_quantities: Estimated market quantities.

Description

Estimated market quantities.

Usage

demanded_quantities(object, parameters)

# S4 method for market_model demanded_quantities(object, parameters)

supplied_quantities(object, parameters)

# S4 method for market_model supplied_quantities(object, parameters)

Arguments

object

A model object.

parameters

A vector of model's parameters.

Value

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

Functions

  • demanded_quantities: Estimated demanded quantities.

  • supplied_quantities: Estimated supplied quantities.

Details

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

Examples

Run this code
# NOT RUN {
# initialize the model using the houses dataset
model <- new(
  "diseq_basic", # model type
  c("ID", "TREND"), "HS", "RM", # keys, quantity, and price variables
  "RM + TREND + W + CSHS + L1RM + L2RM + MONTH", # demand specification
  "RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH", # supply specification
  fair_houses(), # data
  correlated_shocks = FALSE # allow shocks to be correlated
)

# estimate the model object (BFGS is used by default)
est <- estimate(model)

# get estimated demanded and supplied quantities
head(cbind(demanded_quantities(model, est@coef),
     supplied_quantities(model, est@coef)))
# }

Run the code above in your browser using DataLab