{
  "_id": "6a105d51acfb0bcc41ca4a14",
  "Package": "mlmodels",
  "Title": "Maximum Likelihood Models and Tools for Estimation, Prediction,\nand Testing",
  "Version": "0.1.2",
  "Authors@R": "person(given = \"Alfonso\",\nfamily = \"Sanchez-Penalver\",\nemail = \"oneiros_spain@yahoo.com\",\nrole = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0001-8491-4632\"))",
  "Description": "Provides a collection of maximum likelihood estimators\nwith a consistent S3 interface. Supported models include\nGaussian (linear and log-normal), logit, probit, Poisson,\nnegative binomial (NB1 and NB2), gamma, and beta regression. A\ndistinctive feature is flexible modeling of the scale parameter\n(variance, dispersion, precision, or shape) alongside the\nlocation/mean parameters. The package offers unified predict()\nmethods, multiple variance-covariance estimators (observed\ninformation, outer product of gradients, robust/Huber-White,\ncluster-robust, bootstrap, jackknife), and a full suite of\nhypothesis tests (Wald, likelihood ratio, information matrix,\nVuong, overdispersion, and goodness-of-fit). It is fully\ncompatible with 'marginaleffects' for post-estimation analysis.\nMethods implemented include Cameron and Trivedi (1990)\n<doi:10.1016/0304-4076(90)90014-K>, for Poisson overdispersion\ntesting, Manjon and Martinez (2014)\n<doi:10.1177/1536867X1401400406>, for goodness-of-fit testing\nof count data models, Vuong (1989) <doi:10.2307/1912557>, for\nnon-nested likelihood ratio testing, and White (1982)\n<doi:10.2307/1912526>, for information matrix tests.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/pkgdown/logo": "man/figures/logo.png",
  "URL": "https://alfisankipan.github.io/mlmodels/",
  "BugReports": "https://github.com/alfisankipan/mlmodels/issues",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-08 19:19:03 UTC",
    "User": "root"
  },
  "Author": "Alfonso Sanchez-Penalver [aut, cre] (ORCID:\n<https://orcid.org/0000-0001-8491-4632>)",
  "Maintainer": "Alfonso Sanchez-Penalver <oneiros_spain@yahoo.com>",
  "Repository": "https://cran.r-universe.dev",
  "Date/Publication": "2026-05-08 17:47:52 UTC",
  "RemoteUrl": "https://github.com/cran/mlmodels",
  "RemoteRef": "HEAD",
  "RemoteSha": "ff1213a47d8c7abb769b80195273490458c8ed13",
  "MD5sum": "f99877241153ae6415f2aeaf3af34709",
  "_user": "cran",
  "_type": "src",
  "_file": "mlmodels_0.1.2.tar.gz",
  "_fileid": "7387ac50a539c20b1aeab9935c113d9f0071d06da6d502818f2a4c238092d5d7",
  "_filesize": 1787507,
  "_sha256": "7387ac50a539c20b1aeab9935c113d9f0071d06da6d502818f2a4c238092d5d7",
  "_created": "2026-05-08T19:19:03.000Z",
  "_published": "2026-05-22T13:42:41.630Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77391640301,
      "time": 302,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6887075738"
    },
    {
      "job": 77391640012,
      "time": 300,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6887073044"
    },
    {
      "job": 77391639132,
      "time": 263,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6886980048"
    },
    {
      "job": 77391638933,
      "time": 122,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7161959393"
    }
  ],
  "_buildurl": "https://github.com/r-universe/cran/actions/runs/25574608789",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/mlmodels",
  "_commit": {
    "id": "ff1213a47d8c7abb769b80195273490458c8ed13",
    "author": "Alfonso Sanchez-Penalver <oneiros_spain@yahoo.com>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 0.1.2\n",
    "time": 1778262472
  },
  "_maintainer": {
    "name": "Alfonso Sanchez-Penalver",
    "email": "oneiros_spain@yahoo.com",
    "login": "alfisankipan",
    "uuid": 85194589,
    "orcid": "0000-0001-8491-4632"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "cli",
      "role": "Imports"
    },
    {
      "package": "hardhat",
      "role": "Imports"
    },
    {
      "package": "insight",
      "role": "Imports"
    },
    {
      "package": "marginaleffects",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "role": "Imports"
    },
    {
      "package": "matrixcalc",
      "role": "Imports"
    },
    {
      "package": "maxLik",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "boot",
      "role": "Suggests"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "e1071",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "patchwork",
      "role": "Suggests"
    },
    {
      "package": "pkgdown",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "wooldridge",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": false,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-19",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "0.1.2",
      "date": "2026-05-08"
    }
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "alfisankipan",
      "count": 1,
      "uuid": 85194589
    }
  ],
  "_userbio": {
    "uuid": 6899542,
    "type": "organization",
    "name": "cran",
    "description": "Unofficial read-only mirror of all CRAN R packages"
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/mlmodels"
  },
  "_devurl": "https://github.com/alfisankipan/mlmodels",
  "_pkgdown": "https://alfisankipan.github.io/mlmodels/",
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/mlmodels.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.1.2",
      "date": "2026-05-08"
    }
  ],
  "_exports": [
    "%||%",
    "find_variables.mlmodel",
    "get_modeldata.mlmodel",
    "GOFtest",
    "gradientObs",
    "hessianObs",
    "IMtest",
    "loglikeObs",
    "lrtest",
    "ml_beta",
    "ml_gamma",
    "ml_lm",
    "ml_logit",
    "ml_negbin",
    "ml_poisson",
    "ml_probit",
    "OVDtest",
    "se",
    "vuongtest",
    "waldtest"
  ],
  "_datasets": [
    {
      "name": "docvis",
      "title": "U.S. Medical Expenditure Panel Survey",
      "object": "docvis",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "offer",
        "ssiratio",
        "age",
        "educyr",
        "physician",
        "nonphysician",
        "medicaid",
        "private",
        "female",
        "phylim",
        "actlim",
        "income",
        "totchr",
        "insured",
        "age2",
        "linc",
        "bh",
        "docvis",
        "ldocvis",
        "ldocvisa",
        "one",
        "docbin"
      ],
      "rows": 3677,
      "table": true,
      "tojson": true
    },
    {
      "name": "mroz",
      "title": "University of Michigan Panel Study of Income Dynamics (PSID)",
      "object": "mroz",
      "class": [
        "data.frame"
      ],
      "fields": [
        "inlf",
        "hours",
        "kidslt6",
        "kidsge6",
        "age",
        "educ",
        "wage",
        "repwage",
        "hushrs",
        "husage",
        "huseduc",
        "huswage",
        "faminc",
        "mtr",
        "motheduc",
        "fatheduc",
        "unem",
        "city",
        "exper",
        "nwifeinc",
        "lwage",
        "expersq"
      ],
      "rows": 753,
      "table": true,
      "tojson": true
    },
    {
      "name": "pw401k",
      "title": "401(k) Participation Rates",
      "object": "pw401k",
      "class": [
        "spec_tbl_df",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "prate",
        "mrate",
        "totemp",
        "age",
        "sole"
      ],
      "rows": 4734,
      "table": true,
      "tojson": true
    },
    {
      "name": "smoke",
      "title": "1979 National Health Interview Survey",
      "object": "smoke",
      "class": [
        "data.frame"
      ],
      "fields": [
        "educ",
        "cigpric",
        "white",
        "age",
        "income",
        "cigs",
        "restaurn",
        "lincome",
        "agesq",
        "lcigpric"
      ],
      "rows": 807,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "AIC.mlmodel",
      "title": "Extract AIC from mlmodel objects",
      "topics": [
        "AIC.mlmodel",
        "AIC.summary.mlmodel"
      ]
    },
    {
      "page": "BIC.mlmodel",
      "title": "Extract BIC from mlmodel objects",
      "topics": [
        "BIC.mlmodel",
        "BIC.summary.mlmodel"
      ]
    },
    {
      "page": "coef.mlmodel",
      "title": "Extract Model Coefficients",
      "topics": [
        "coef.mlmodel"
      ]
    },
    {
      "page": "confint.mlmodel",
      "title": "Confidence Intervals for mlmodel Coefficients",
      "topics": [
        "confint.mlmodel"
      ]
    },
    {
      "page": "docvis",
      "title": "U.S. Medical Expenditure Panel Survey",
      "topics": [
        "docvis"
      ]
    },
    {
      "page": "find_predictors.mlmodel",
      "title": "Extract the predictors used in the model (for insight/marginaleffects compatibility)",
      "topics": [
        "find_predictors.mlmodel"
      ]
    },
    {
      "page": "find_variables.mlmodel",
      "title": "Extract the variables used in the model (for insight/marginaleffects compatibility)",
      "topics": [
        "find_variables.mlmodel"
      ]
    },
    {
      "page": "fitted.mlmodel",
      "title": "Extract Fitted Values from mlmodel",
      "topics": [
        "fitted.mlmodel",
        "fitted.values.mlmodel"
      ]
    },
    {
      "page": "formula.mlmodel",
      "title": "Extract value formula from mlmodel objects",
      "topics": [
        "formula.mlmodel"
      ]
    },
    {
      "page": "get_data.mlmodel",
      "title": "Extract data used to fit the model (for insight/marginaleffects compatibility)",
      "topics": [
        "get_data.mlmodel",
        "get_modeldata.mlmodel"
      ]
    },
    {
      "page": "GOFtest",
      "title": "Goodness-of-Fit Test for Count Models",
      "topics": [
        "GOFtest",
        "GOFtest.mlmodel"
      ]
    },
    {
      "page": "gradientObs",
      "title": "Gradient (Score) by Observation",
      "topics": [
        "gradientObs",
        "gradientObs.mlmodel"
      ]
    },
    {
      "page": "hessianObs",
      "title": "Hessian by Observation",
      "topics": [
        "hessianObs",
        "hessianObs.mlmodel"
      ]
    },
    {
      "page": "IMtest",
      "title": "Information Matrix Test for Model Misspecification",
      "topics": [
        "IMtest",
        "IMtest.mlmodel"
      ]
    },
    {
      "page": "logLik.mlmodel",
      "title": "Extract Log-Likelihood from mlmodel objects",
      "topics": [
        "logLik.mlmodel",
        "logLik.summary.mlmodel"
      ]
    },
    {
      "page": "loglikeObs",
      "title": "Log-Likelihood by Observation",
      "topics": [
        "loglikeObs",
        "loglikeObs.mlmodel"
      ]
    },
    {
      "page": "lrtest",
      "title": "Likelihood Ratio Test for Nested mlmodel Objects",
      "topics": [
        "lrtest",
        "lrtest.mlmodel"
      ]
    },
    {
      "page": "ml_beta",
      "title": "Fit Beta Model by Maximum Likelihood",
      "topics": [
        "ml_beta"
      ]
    },
    {
      "page": "ml_gamma",
      "title": "Fit Gamma Model by Maximum Likelihood",
      "topics": [
        "ml_gamma"
      ]
    },
    {
      "page": "ml_lm",
      "title": "Fit linear model by Maximum Likelihood",
      "topics": [
        "ml_lm"
      ]
    },
    {
      "page": "ml_logit",
      "title": "Fit Binary Logit Model by Maximum Likelihood",
      "topics": [
        "ml_logit"
      ]
    },
    {
      "page": "ml_negbin",
      "title": "Fit negative binomial models by Maximum Likelihood",
      "topics": [
        "ml_negbin"
      ]
    },
    {
      "page": "ml_poisson",
      "title": "Fit Poisson model by Maximum Likelihood",
      "topics": [
        "ml_poisson"
      ]
    },
    {
      "page": "ml_probit",
      "title": "Fit Binary Probit Model by Maximum Likelihood",
      "topics": [
        "ml_probit"
      ]
    },
    {
      "page": "mroz",
      "title": "University of Michigan Panel Study of Income Dynamics (PSID)",
      "topics": [
        "mroz"
      ]
    },
    {
      "page": "nobs.mlmodel",
      "title": "Extract the Number of Observations from an mlmodel",
      "topics": [
        "nobs.mlmodel"
      ]
    },
    {
      "page": "null-default",
      "title": "Null default operator",
      "topics": [
        "%||%",
        "null-default"
      ]
    },
    {
      "page": "OVDtest",
      "title": "Overdispersion Tests for Count Models",
      "topics": [
        "OVDtest"
      ]
    },
    {
      "page": "predict.mlmodel",
      "title": "Predictions for mlmodel models",
      "topics": [
        "predict.mlmodel",
        "predict.ml_beta",
        "predict.ml_gamma",
        "predict.ml_lm",
        "predict.ml_logit",
        "predict.ml_negbin",
        "predict.ml_poisson",
        "predict.ml_probit"
      ]
    },
    {
      "page": "pw401k",
      "title": "401(k) Participation Rates",
      "topics": [
        "pw401k"
      ]
    },
    {
      "page": "residuals.mlmodel",
      "title": "Extract Model Residuals",
      "topics": [
        "residuals.mlmodel"
      ]
    },
    {
      "page": "se",
      "title": "Extract Standard Errors from mlmodel Objects",
      "topics": [
        "se",
        "se.mlmodel"
      ]
    },
    {
      "page": "smoke",
      "title": "1979 National Health Interview Survey",
      "topics": [
        "smoke"
      ]
    },
    {
      "page": "summary.mlmodel",
      "title": "Summary for mlmodel objects",
      "topics": [
        "summary.mlmodel",
        "summary.ml_beta",
        "summary.ml_gamma",
        "summary.ml_lm",
        "summary.ml_logit",
        "summary.ml_negbin",
        "summary.ml_poisson",
        "summary.ml_probit"
      ]
    },
    {
      "page": "update.mlmodel",
      "title": "Update an mlmodel Call",
      "topics": [
        "update.mlmodel",
        "update.ml_poisson"
      ]
    },
    {
      "page": "vcov.mlmodel",
      "title": "Variance-Covariance Matrix for mlmodel Objects",
      "topics": [
        "vcov.mlmodel"
      ]
    },
    {
      "page": "vuongtest",
      "title": "Vuong's Test for Non-Nested Models",
      "topics": [
        "vuongtest",
        "vuongtest.mlmodel"
      ]
    },
    {
      "page": "waldtest",
      "title": "Wald Test for Linear Restrictions",
      "topics": [
        "waldtest",
        "waldtest.mlmodel"
      ]
    }
  ],
  "_pkglogo": "https://github.com/cran/mlmodels/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/cran/mlmodels/raw/HEAD/README.md",
  "_rundeps": [
    "backports",
    "checkmate",
    "cli",
    "data.table",
    "digest",
    "Formula",
    "generics",
    "glue",
    "hardhat",
    "insight",
    "lattice",
    "lifecycle",
    "magrittr",
    "marginaleffects",
    "MASS",
    "matrixcalc",
    "maxLik",
    "miscTools",
    "pillar",
    "pkgconfig",
    "rlang",
    "sandwich",
    "sparsevctrs",
    "tibble",
    "utf8",
    "vctrs",
    "zoo"
  ],
  "_vignettes": [
    {
      "source": "mlmodels-diagnostics.Rmd",
      "filename": "mlmodels-diagnostics.html",
      "title": "Diagnostic Tools in mlmodels",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Information Matrix Test",
        "Implementing the Test",
        "Illustrating the Size and Power Problems",
        "Testing Nested Models",
        "Likelihood-ratio Test",
        "Wald Test",
        "Testing Non-nested Models",
        "Tests for Count Data Models",
        "Concluding Remarks",
        "References"
      ],
      "created": "2026-05-08 17:47:52",
      "modified": "2026-05-08 17:47:52",
      "commits": 1
    },
    {
      "source": "mlmodels-fractional.Rmd",
      "filename": "mlmodels-fractional.html",
      "title": "Fractional Response Outcomes",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "QMLE with Observations at the Boundary",
        "Estimation with Logit and Probit",
        "Predicted Probabilities and Marginal Effects",
        "Strict Fractional Responses",
        "Note on the Log-Likelihood of the Beta Model",
        "Concluding Remarks",
        "References"
      ],
      "created": "2026-05-08 17:47:52",
      "modified": "2026-05-08 17:47:52",
      "commits": 1
    },
    {
      "source": "mlmodels-gamma-lognormal.Rmd",
      "filename": "mlmodels-gamma-lognormal.html",
      "title": "Gamma versus Lognormal",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Exploring the Outcome Variable",
        "Model Estimation",
        "Estimates",
        "Postestimation Analysis",
        "Analysis of the Mean Predictions",
        "Analysis of the Predictions of the Variance",
        "Concluding Remarks"
      ],
      "created": "2026-05-08 17:47:52",
      "modified": "2026-05-08 17:47:52",
      "commits": 1
    },
    {
      "source": "mlmodels-countintro.Rmd",
      "filename": "mlmodels-countintro.html",
      "title": "Introduction to Count Data",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "The Data",
        "Poisson Model",
        "Test of Overdispersion",
        "Average Marginal Effects",
        "Negative Binomial Estimation",
        "Predictions of the Mean: Poisson vs Negative Binomial",
        "Model Comparison: NB1 versus NB2",
        "Comparing Predicted Probabilities",
        "Heteroskedastic Negative Binomial Models",
        "Concluding Remarks",
        "References"
      ],
      "created": "2026-05-08 17:47:52",
      "modified": "2026-05-08 17:47:52",
      "commits": 1
    },
    {
      "source": "mlmodels-basics.Rmd",
      "filename": "mlmodels-basics.html",
      "title": "Maximum Likelihood Models in R",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Core Features",
        "Quick Start",
        "Making Predictions",
        "Modeling Heteroskedasticity",
        "Controlling Intercepts",
        "Binary Outcomes: Logit",
        "Where to Go Next",
        "References"
      ],
      "created": "2026-05-08 17:47:52",
      "modified": "2026-05-08 17:47:52",
      "commits": 1
    },
    {
      "source": "mlmodels-predictions.Rmd",
      "filename": "mlmodels-predictions.html",
      "title": "Predictions with mlmodels",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "The predict() Method",
        "Basic Usage",
        "Predicting for Different Models",
        "Comparison with predictions() from marginaleffects",
        "In-Sample and Out-of-Sample Predictions",
        "Bootstrap Inference",
        "Interaction Effects and Plotting",
        "Concluding Remarks"
      ],
      "created": "2026-05-08 17:47:52",
      "modified": "2026-05-08 17:47:52",
      "commits": 1
    },
    {
      "source": "mlmodels-variance.Rmd",
      "filename": "mlmodels-variance.html",
      "title": "Variance-Covariance Estimation in mlmodels",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Why Different Variance Estimators Matter",
        "Classical Information Matrix Estimators",
        "Observed Information Matrix (oim) — Default",
        "Outer Product of Gradients (opg)",
        "The \"Hessian may be singular\" warning",
        "Example: Heteroskedastic Logit Model",
        "Robust Variance Estimators",
        "Robust (Sandwich / Huber-White) Estimator",
        "Clustering",
        "Bootstrap and Jackknife Estimators",
        "Why use resampling methods?",
        "Asymptotic Equivalence",
        "Important Feature of Our Implementation",
        "Practical Recommendations",
        "Quick Decision Guide",
        "Best Practices",
        "Concluding Remarks"
      ],
      "created": "2026-05-08 17:47:52",
      "modified": "2026-05-08 17:47:52",
      "commits": 1
    }
  ],
  "_score": 3.5440680443502757,
  "_indexed": true,
  "_nocasepkg": "mlmodels",
  "_universes": [
    "cran",
    "alfisankipan"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.2",
      "date": "2026-05-08T19:21:41.000Z",
      "distro": "noble",
      "commit": "ff1213a47d8c7abb769b80195273490458c8ed13",
      "fileid": "a0dd09d194283d4a08a53bb2a73e276f2f75bd71d7beff85733cc25730cfcf0f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/25574608789"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.2",
      "date": "2026-05-08T19:21:30.000Z",
      "distro": "noble",
      "commit": "ff1213a47d8c7abb769b80195273490458c8ed13",
      "fileid": "0ecd7831690d3a4d30931fb402ebfa08d7eb0c9f0fd2a6b3d174459ebc14a40e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/25574608789"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.2",
      "date": "2026-05-22T13:42:21.000Z",
      "commit": "ff1213a47d8c7abb769b80195273490458c8ed13",
      "fileid": "6a9e31cac20d06ebb5f05c08c3c07159fa036d7105ad1eb3492eaa3c691a4040",
      "status": "success",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/25574608789"
    }
  ]
}