plot: Plots the fitted model.

plot,market_fit,ANY-methodR Documentation

Plots the fitted model.

Description

Displays a graphical illustration of the passed fitted model object. The function creates a scatter plot of quantity-price pairs for the records corresponding to the given subject and time identifiers. Then, it plots the average fitted demand and supply quantities for the same data subset letting prices vary between the minimum and maximum price points observed in the data subset.

Usage

## S4 method for signature 'market_fit,ANY'
plot(x, subject, time, ...)

Arguments

x

A model object.

subject

A vector of subject identifiers to be used in the visualization.

time

A vector of time identifiers to be used in the visualization.

...

Additional parameter to be used for styling the figure. Specifically xlab, ylab, and main are currently handled by the function.

Examples


# estimate a model using the houses dataset
fit <- diseq_deterministic_adjustment(
  HS | RM | ID | TREND ~
  RM + TREND + W + CSHS + L1RM + L2RM + MONTH |
  RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH,
  fair_houses(),  correlated_shocks = FALSE,
  estimation_options = list(control = list(maxit = 1e+6)))

# show model's illustration plot
plot(fit)


diseq documentation built on June 2, 2022, 1:10 a.m.