This function generates predictions for new data points based on a fitted categorical Generalized Linear Model (GLM) object.
Depending on the type of model, it either uses stats::predict.glm or calculates predictions based on the model coefficients.
# S3 method for cat_glm
predict(object, newdata = NULL, ...)A vector of predicted values for the specified new data.
A fitted model object of class cat_glm, containing the GLM fit and model details.
An optional data frame containing new predictor values. If NULL,
the function uses the observation data from the model's initialization object.
Additional arguments passed to stats::predict.glm, if applicable.
User should input type = c("link", "response", "terms") for different regression models.