# \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+5))
)
# mean marginal effect of variable "RM" on the shortage probabilities
#' shortage_probability_marginal(fit, "RM")
# marginal effect at the mean of variable "RM" on the shortage probabilities
shortage_probability_marginal(fit, "CSHS", aggregate = "at_the_mean")
# marginal effect of variable "RM" on the system
shortage_marginal(fit, "RM")
# }
Run the code above in your browser using DataLab