shortage_analysis | R Documentation |
Analysis of shortages
shortages(fit, model, parameters) normalized_shortages(fit, model, parameters) relative_shortages(fit, model, parameters) shortage_probabilities(fit, model, parameters) shortage_indicators(fit, model, parameters) shortage_standard_deviation(fit, model, parameters) ## S4 method for signature 'missing,market_model,ANY' shortages(model, parameters) ## S4 method for signature 'missing,market_model,ANY' normalized_shortages(model, parameters) ## S4 method for signature 'missing,market_model,ANY' relative_shortages(model, parameters) ## S4 method for signature 'missing,market_model,ANY' shortage_probabilities(model, parameters) ## S4 method for signature 'missing,market_model,ANY' shortage_indicators(model, parameters) ## S4 method for signature 'missing,market_model,ANY' shortage_standard_deviation(model, parameters) ## S4 method for signature 'missing,diseq_stochastic_adjustment,ANY' shortage_standard_deviation(model, parameters) ## S4 method for signature 'market_fit,missing,missing' shortages(fit) ## S4 method for signature 'market_fit,missing,missing' normalized_shortages(fit) ## S4 method for signature 'market_fit,missing,missing' relative_shortages(fit) ## S4 method for signature 'market_fit,missing,missing' shortage_probabilities(fit) ## S4 method for signature 'market_fit,missing,missing' shortage_indicators(fit) ## S4 method for signature 'market_fit,missing,missing' shortage_standard_deviation(fit)
fit |
A fitted model object. |
model |
A market model object. |
parameters |
A vector of parameters at which the shortages are evaluated. |
The following methods offer functionality for analyzing estimated shortages of the market models. The methods can be called either using directly a fitted model object, or by separately providing a model object and a parameter vector.
Returns the predicted shortages at a given point.
Returns the shortages normalized by the variance of the difference of the shocks at a given point.
Returns the shortages normalized by the supplied quantity at a given point.
Returns the shortage probabilities, i.e. the probabilities of an observation coming from an excess demand state, at the given point.
Returns a vector of indicators (Boolean values) for each observation. An element of the vector is TRUE for observations at which the estimated shortages are non-negative, i.e. the market at in an excess demand state. The remaining elements are FALSE. The evaluation of the shortages is performed using the passed parameter vector.
Returns the variance of excess demand.
A vector with the (estimated) shortages.
shortages
: Shortages.
normalized_shortages
: Normalized shortages.
relative_shortages
: Relative shortages.
shortage_probabilities
: Shortage probabilities.
shortage_indicators
: Shortage indicators.
shortage_standard_deviation
: Shortage variance.
# 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+5))) # get estimated normalized shortages head(normalized_shortages(fit)) # get estimated relative shortages head(relative_shortages(fit)) # get the estimated shortage probabilities head(shortage_probabilities(fit)) # get the estimated shortage indicators head(shortage_indicators(fit)) # get the estimated shortages head(shortages(fit)) # get the estimated shortage variance shortage_standard_deviation(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.