Estimating Marginal Effects with Zero-inflated Models: A Tutorial with R package mzim

preprint OA: closed
Full text JSON View at publisher

Abstract

Abstract Count data in the psychological and health sciences are often characterized by an excess of zero values, a feature known as zero-inflation. While traditional zero-inflated models, such as the Zero-Inflated Poisson (ZIP) and Zero-Inflated Negative Binomial (ZINB), were developed to handle such data, they present challenges for applied researchers. Standard count models can produce biased estimates, and the dual-parameter output of traditional zero-inflated models provides conditional effects for a latent at-risk subpopulation, which complicates interpretation and often fails to directly answer research questions about the entire population. To address these limitations, marginalized zero-inflated (mZI) models directly estimate the population-averaged effect, yielding a single, interpretable coefficient for each predictor's overall effect. However, the adoption of mZI models has been hindered by the lack of an accessible software package. The current study has two objectives: first, it provides a tutorial on the theory, estimation, and interpretation of marginalized zero-inflated models. Second, it introduces mzim , a new R package designed to make both marginalized zero-inflated Poisson (mZIP) and Negative Binomial (mZINB) models readily accessible. Using an empirical example on self-reported youth abuse experiences, we demonstrate a complete workflow with the mzim package and compare the results from the mZINB model to traditional approaches, highlighting the practical benefits of the marginalized framework for applied researchers.
Full text 13,844 characters · extracted from preprint-html · click to expand
Estimating Marginal Effects with Zero-inflated Models: A Tutorial with R package mzim | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Estimating Marginal Effects with Zero-inflated Models: A Tutorial with R package mzim Chendong Li, Oi-Man Kwok, Timothy Lawrence This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8224986/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Count data in the psychological and health sciences are often characterized by an excess of zero values, a feature known as zero-inflation. While traditional zero-inflated models, such as the Zero-Inflated Poisson (ZIP) and Zero-Inflated Negative Binomial (ZINB), were developed to handle such data, they present challenges for applied researchers. Standard count models can produce biased estimates, and the dual-parameter output of traditional zero-inflated models provides conditional effects for a latent at-risk subpopulation, which complicates interpretation and often fails to directly answer research questions about the entire population. To address these limitations, marginalized zero-inflated (mZI) models directly estimate the population-averaged effect, yielding a single, interpretable coefficient for each predictor's overall effect. However, the adoption of mZI models has been hindered by the lack of an accessible software package. The current study has two objectives: first, it provides a tutorial on the theory, estimation, and interpretation of marginalized zero-inflated models. Second, it introduces mzim , a new R package designed to make both marginalized zero-inflated Poisson (mZIP) and Negative Binomial (mZINB) models readily accessible. Using an empirical example on self-reported youth abuse experiences, we demonstrate a complete workflow with the mzim package and compare the results from the mZINB model to traditional approaches, highlighting the practical benefits of the marginalized framework for applied researchers. Applied Statistics Full Text Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8224986","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":551933813,"identity":"e32f5934-3207-4dfe-b477-739380f66f67","order_by":0,"name":"Chendong Li","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAuUlEQVRIiWNgGAWjYDACdsYGECUH5TIToYUZqOVAAoMxDwlagBioJbGHaC38zcyNnz/+OJy+n/10mgRDhXViAyEtEocZmyUOJKTl9vDkbpNgOJNOWIsB0C9ALTa5PQxALYxth4nS0vzjQIJEOg//W6CWf8RpaQPZksAjAbKlgQgtQL+0WZxJSzPsufF2s0XCsXRjglr429sf36iwOSzP3p+78caHGmtZglpQQQJpykfBKBgFo2AU4AIAifo7kOULxhoAAAAASUVORK5CYII=","orcid":"","institution":"","correspondingAuthor":true,"prefix":"","firstName":"Chendong","middleName":"","lastName":"Li","suffix":""},{"id":551933777,"identity":"554a2fc9-aa84-4402-ba1c-e911edb8e70f","order_by":1,"name":"Oi-Man Kwok","email":"","orcid":"","institution":"","correspondingAuthor":false,"prefix":"","firstName":"Oi-Man","middleName":"","lastName":"Kwok","suffix":""},{"id":551933778,"identity":"c1652c52-ffc8-4e5a-8b81-1339edbe030a","order_by":2,"name":"Timothy Lawrence","email":"","orcid":"","institution":"","correspondingAuthor":false,"prefix":"","firstName":"Timothy","middleName":"","lastName":"Lawrence","suffix":""}],"badges":[],"createdAt":"2025-11-27 20:56:06","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-8224986/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8224986/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":97232482,"identity":"a11c9332-1fc0-4160-8cb0-2134a2a20bf6","added_by":"auto","created_at":"2025-12-02 09:38:58","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":80899,"visible":true,"origin":"","legend":"","description":"","filename":"Manuscript.docx","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1/4750aa1fa1eaee5dec94c755.docx"},{"id":97232472,"identity":"7609aeb7-8c7a-4973-accc-322a7c4e4c6a","added_by":"auto","created_at":"2025-12-02 09:38:57","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":342,"visible":true,"origin":"","legend":"","description":"","filename":"rs8224986.json","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1/7c334b7c052ea8549ac97eb3.json"},{"id":97232465,"identity":"4254d630-5bd6-4087-bb36-e3b00be314c3","added_by":"auto","created_at":"2025-12-02 09:38:56","extension":"xml","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":109338,"visible":true,"origin":"","legend":"","description":"","filename":"rs82249860enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1/36f2bb443c09dfdb3c8c6c12.xml"},{"id":97232477,"identity":"83818244-c91c-4d57-b532-13b013f58695","added_by":"auto","created_at":"2025-12-02 09:38:58","extension":"emf","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":730596,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.emf","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1/cd145ee3aec7f36058812878.emf"},{"id":97232460,"identity":"54ce69d1-be44-4e3d-907c-09e91ca5e1e9","added_by":"auto","created_at":"2025-12-02 09:38:56","extension":"png","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2206,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1/0d07c03472a1fb9a51a38c0a.png"},{"id":97232471,"identity":"a0bffd27-9dc7-4de3-ae21-73f2edb614d3","added_by":"auto","created_at":"2025-12-02 09:38:57","extension":"xml","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":107409,"visible":true,"origin":"","legend":"","description":"","filename":"rs82249860structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1/1403527fd0e69cd7db0c407d.xml"},{"id":97232470,"identity":"5236a064-4cf2-4b8b-96cb-41de968fb988","added_by":"auto","created_at":"2025-12-02 09:38:57","extension":"html","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":123865,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1/4ea0a141cef22332e3120782.html"},{"id":97232622,"identity":"a05f82af-6562-46bb-91da-648ad6a3a231","added_by":"auto","created_at":"2025-12-02 09:39:13","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":490611,"visible":true,"origin":"","legend":"","description":"","filename":"Manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8224986/v1_covered_09a79925-8745-42cd-90f0-b7d1be6be9f6.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eEstimating Marginal Effects with Zero-inflated Models: A Tutorial with R package \u003c/strong\u003e\u003cem\u003e\u003cstrong\u003emzim\u003c/strong\u003e\u003c/em\u003e\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Texas A\u0026M University","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":true,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"","lastPublishedDoi":"10.21203/rs.3.rs-8224986/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8224986/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eCount data in the psychological and health sciences are often characterized by an excess of zero values, a feature known as zero-inflation. While traditional zero-inflated models, such as the Zero-Inflated Poisson (ZIP) and Zero-Inflated Negative Binomial (ZINB), were developed to handle such data, they present challenges for applied researchers. Standard count models can produce biased estimates, and the dual-parameter output of traditional zero-inflated models provides conditional effects for a latent at-risk subpopulation, which complicates interpretation and often fails to directly answer research questions about the entire population. To address these limitations, marginalized zero-inflated (mZI) models directly estimate the population-averaged effect, yielding a single, interpretable coefficient for each predictor's overall effect. However, the adoption of mZI models has been hindered by the lack of an accessible software package. The current study has two objectives: first, it provides a tutorial on the theory, estimation, and interpretation of marginalized zero-inflated models. Second, it introduces \u003cem\u003emzim\u003c/em\u003e, a new R package designed to make both marginalized zero-inflated Poisson (mZIP) and Negative Binomial (mZINB) models readily accessible. Using an empirical example on self-reported youth abuse experiences, we demonstrate a complete workflow with the \u003cem\u003emzim\u003c/em\u003e package and compare the results from the mZINB model to traditional approaches, highlighting the practical benefits of the marginalized framework for applied researchers.\u003c/p\u003e","manuscriptTitle":"Estimating Marginal Effects with Zero-inflated Models: A Tutorial with R package mzim","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-12-02 09:38:17","doi":"10.21203/rs.3.rs-8224986/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"84d90e7d-71c4-435e-8eee-f6fa9da95b88","owner":[],"postedDate":"December 2nd, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":58735512,"name":"Applied Statistics"}],"tags":[],"updatedAt":"2025-12-02T09:38:17+00:00","versionOfRecord":[],"versionCreatedAt":"2025-12-02 09:38:17","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8224986","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8224986","identity":"rs-8224986","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00