This internal function fits a multinomial regression model for a categorical covariate using the observed data.
fit_multinomial(covparams, obs_data, j, model_fits)
Fitted model for the covariate at index \(j\).
List of vectors, where each vector contains information for one parameter used in the modeling of the time-varying covariates (e.g., model statement, family, link function, etc.).
Data on which the model is fit.
Integer specifying the index of the covariate.
Logical scalar indicating whether to return the fitted models. The default is FALSE
.