| check_demand_model | R Documentation |
Performs diagnostic checks on fitted demand models, returning information about convergence, boundary conditions, and residual patterns.
check_demand_model(object, ...)
## S3 method for class 'beezdemand_hurdle'
check_demand_model(object, ...)
## S3 method for class 'beezdemand_nlme'
check_demand_model(object, ...)
## S3 method for class 'beezdemand_fixed'
check_demand_model(object, ...)
object |
A fitted model object of class |
... |
Additional arguments passed to methods. |
The function checks for:
Convergence status and optimization messages
Parameters at or near boundaries
Residual patterns (heteroscedasticity, outliers)
Random effect variance estimates near zero
Correlation matrices near singularity
An object of class beezdemand_diagnostics containing:
List with convergence status and messages
List with boundary condition warnings
Summary statistics for residuals
Summary of random effects (if applicable)
Character vector of identified issues
Character vector of recommendations
This function is named check_demand_model() to avoid potential conflicts
with performance::check_model() from the performance package.
plot_residuals(), plot_qq()
data(apt)
fit <- fit_demand_hurdle(apt, y_var = "y", x_var = "x", id_var = "id")
diagnostics <- check_demand_model(fit)
print(diagnostics)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.