# \donttest{
# An example of estimating the equilibrium model
eq <- equilibrium_model(
HS | RM | ID | TREND ~ RM + TREND + W + CSHS + L1RM + L2RM + MONTH |
RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH,
fair_houses(), estimation_options = list(control = list(maxit = 5000))
)
# An example of estimating the deterministic adjustment model
da <- diseq_deterministic_adjustment(
HS | RM | ID | TREND ~ RM + TREND + W + CSHS + L1RM + L2RM + MONTH |
RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH,
fair_houses(),
verbose = 2,
estimation_options = list(control = list(maxit = 5000))
)
# An example of estimating the directional model
dr <- diseq_directional(
HS | RM | ID | TREND ~ TREND + W + CSHS + L1RM + L2RM |
RM + TREND + W + MA6DSF + MA3DHF + MONTH,
fair_houses(), estimation_options = list(
method = "Nelder-Mead", control = list(maxit = 5000)
)
)
# An example of estimating the basic model
start <- coef(eq)
start <- start[names(start) != "RHO"]
bs <- diseq_basic(
HS | RM | ID | TREND ~ RM + TREND + W + CSHS + L1RM + L2RM + MONTH |
RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH,
fair_houses(), verbose = 2, correlated_shocks = FALSE,
estimation_options = list(
start = start,
control = list(maxit = 5000)
)
)
# An example of estimating the stochastic adjustment model
sa <- diseq_stochastic_adjustment(
HS | RM | ID | TREND ~ RM + TREND + W + CSHS + MONTH |
RM + TREND + W + L1RM + L2RM + MA6DSF + MA3DHF + MONTH |
TREND + L2RM + L3RM,
fair_houses() |> dplyr::mutate(L3RM = dplyr::lag(RM, 3)),
correlated_shocks = FALSE,
estimation_options = list(
control = list(maxit = 5000), standard_errors = c("W")
)
)
# }
Run the code above in your browser using DataLab