# NOT RUN {
# initialize the model using the houses dataset
model <- new(
"diseq_deterministic_adjustment", # model type
c("ID", "TREND"), "TREND", "HS", "RM", # keys, time, 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, control = list(maxit = 1e+5))
# get estimated normalized shortages
head(normalized_shortages(model, est@coef))
# get estimated relative shortages
head(relative_shortages(model, est@coef))
# get the estimated shortage probabilities
head(shortage_probabilities(model, est@coef))
# get the estimated shortage indicators
head(shortage_indicators(model, est@coef))
# get the estimated shortages
head(shortages(model, est@coef))
# get the estimated shortage variance
shortage_standard_deviation(model, est@coef)
# }
Run the code above in your browser using DataLab