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 market_fit
plot(x, subject, time, show_scatter = TRUE, ...)
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.
- show_scatter
Should the price-quantity scatter be plotted? By default
TRUE
.- ...
Additional parameters to be used for styling the figure. Specifically
xlab
,ylab
, andmain
are currently handled by the function.
Details
If the subject
argument is missing, all subjects are used. If the
time
argument is missing, all time points are used. The scatter
plot of the quantity-price data can be suppressed by setting
show_scatter = FALSE
.
Examples
# \donttest{
# 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)
# }