Skip to contents

Model Fitting

Main model estimation functions

ml_beta()
Fit Beta Model by Maximum Likelihood
ml_gamma()
Fit Gamma Model by Maximum Likelihood
ml_lm()
Fit linear model by Maximum Likelihood
ml_logit()
Fit Binary Logit Model by Maximum Likelihood
ml_negbin()
Fit negative binomial models by Maximum Likelihood
ml_poisson()
Fit Poisson model by Maximum Likelihood
ml_probit()
Fit Binary Probit Model by Maximum Likelihood

Post-Estimation

Prediction, summaries, and marginal effects

predict(<ml_beta>) predict(<ml_gamma>) predict(<ml_lm>) predict(<ml_logit>) predict(<mlmodel>) predict(<ml_negbin>) predict(<ml_poisson>) predict(<ml_probit>)
Predictions for mlmodel models
summary(<ml_beta>) summary(<ml_gamma>) summary(<ml_lm>) summary(<ml_logit>) summary(<mlmodel>) summary(<ml_negbin>) summary(<ml_poisson>) summary(<ml_probit>)
Summary for mlmodel objects
coef(<mlmodel>)
Extract Model Coefficients
vcov(<mlmodel>)
Variance-Covariance Matrix for mlmodel Objects
logLik(<mlmodel>) logLik(<summary.mlmodel>)
Extract Log-Likelihood from mlmodel objects
fitted(<mlmodel>) fitted(<values.mlmodel>)
Extract Fitted Values from mlmodel
residuals(<mlmodel>)
Extract Model Residuals
confint(<mlmodel>)
Confidence Intervals for mlmodel Coefficients
update(<mlmodel>) update(<ml_poisson>)
Update an mlmodel Call

Hypothesis Testing

Model comparison and specification tests

waldtest()
Wald Test for Linear Restrictions
lrtest()
Likelihood Ratio Test for Nested mlmodel Objects
vuongtest()
Vuong's Test for Non-Nested Models
IMtest()
Information Matrix Test for Model Misspecification
OVDtest()
Overdispersion Tests for Count Models
GOFtest()
Goodness-of-Fit Test for Count Models

Internal & Helper Functions

Not usually called directly by users

AIC(<mlmodel>) AIC(<summary.mlmodel>)
Extract AIC from mlmodel objects
BIC(<mlmodel>) BIC(<summary.mlmodel>)
Extract BIC from mlmodel objects
GOFtest()
Goodness-of-Fit Test for Count Models
IMtest()
Information Matrix Test for Model Misspecification
OVDtest()
Overdispersion Tests for Count Models
coef(<mlmodel>)
Extract Model Coefficients
confint(<mlmodel>)
Confidence Intervals for mlmodel Coefficients
docvis
U.S. Medical Expenditure Panel Survey
find_predictors(<mlmodel>)
Extract the predictors used in the model (for insight/marginaleffects compatibility)
find_variables.mlmodel()
Extract the variables used in the model (for insight/marginaleffects compatibility)
fitted(<mlmodel>) fitted(<values.mlmodel>)
Extract Fitted Values from mlmodel
formula(<mlmodel>)
Extract value formula from mlmodel objects
get_data(<mlmodel>) get_modeldata.mlmodel()
Extract data used to fit the model (for insight/marginaleffects compatibility)
gradientObs()
Gradient (Score) by Observation
hessianObs()
Hessian by Observation
logLik(<mlmodel>) logLik(<summary.mlmodel>)
Extract Log-Likelihood from mlmodel objects
loglikeObs()
Log-Likelihood by Observation
lrtest()
Likelihood Ratio Test for Nested mlmodel Objects
ml_beta()
Fit Beta Model by Maximum Likelihood
ml_gamma()
Fit Gamma Model by Maximum Likelihood
ml_lm()
Fit linear model by Maximum Likelihood
ml_logit()
Fit Binary Logit Model by Maximum Likelihood
ml_negbin()
Fit negative binomial models by Maximum Likelihood
ml_poisson()
Fit Poisson model by Maximum Likelihood
ml_probit()
Fit Binary Probit Model by Maximum Likelihood
mroz
University of Michigan Panel Study of Income Dynamics (PSID)
nobs(<mlmodel>)
Extract the Number of Observations from an mlmodel
`%||%`
Null default operator
predict(<ml_beta>) predict(<ml_gamma>) predict(<ml_lm>) predict(<ml_logit>) predict(<mlmodel>) predict(<ml_negbin>) predict(<ml_poisson>) predict(<ml_probit>)
Predictions for mlmodel models
pw401k
401(k) Participation Rates
residuals(<mlmodel>)
Extract Model Residuals
se()
Extract Standard Errors from mlmodel Objects
smoke
1979 National Health Interview Survey
summary(<ml_beta>) summary(<ml_gamma>) summary(<ml_lm>) summary(<ml_logit>) summary(<mlmodel>) summary(<ml_negbin>) summary(<ml_poisson>) summary(<ml_probit>)
Summary for mlmodel objects
update(<mlmodel>) update(<ml_poisson>)
Update an mlmodel Call
vcov(<mlmodel>)
Variance-Covariance Matrix for mlmodel Objects
vuongtest()
Vuong's Test for Non-Nested Models
waldtest()
Wald Test for Linear Restrictions
mlmodels mlmodels-package
mlmodels: Maximum Likelihood Models and Tools for Estimation, Prediction, and Testing