RESEARCH DISCIPLINE
Healthcare Cost Data Analysis
Two-Part and Gamma Models for Skewed Costs
Costs that are right-skewed and full of zeros, modeled on the scale a decision needs: the chance of any cost and the amount given a cost, or a generalized linear model for the mean, with intervals and a check that the model fits the tail.
No Commitment Required
Strictly Confidential
In-House PhD-Level Statisticians
Fixed Project Fee
Same-Day Response
Why Do Healthcare Costs Need Special Models?
Healthcare cost data analysis deals with spending that is right-skewed, bounded below by zero and often zero for a large share of patients. Skewed cost data regression has to estimate the mean on the original scale, since total spending is what a health system must meet, and a model of logged costs gives a different quantity unless it is retransformed with care. Two-part cost models separate the chance of any cost from the amount among those with a cost, while a generalized linear model with a log link estimates the mean directly. These models are fitted, compared and documented in-house at OnlineSPSS, a specialist statistical consultancy for academic, clinical and professional research, by PhD-level statisticians. The economic interpretation is the researcher’s.
WHEN TO ENGAGE
Cost Data From Claims, Trials and Records
The data source shapes the problem, though the work always begins with the shape of the cost distribution.
Many Patients, No Cost A large share of patients have no recorded cost in the period, and the analysis must choose between a two-part structure and a single model and decide what a zero means for the question.
A Few Very Large Bills A handful of admissions account for much of total spending, so the mean is unstable, and whether to keep, truncate or model them separately must be justified and not decided silently.
Mean Difference Needed A health system manager wants the difference in average cost between two programs, with an interval, from a model whose assumptions have been checked against the data.
Reviewer Queries a Transformation A reviewer asks why costs were logged, how estimates were converted back to currency units or why a gamma model was used, and the model must be compared with alternatives.
COST MODELS
Modeling Zeros, Skew and Heavy Tails in Cost Data
The structure of the model follows the structure of the data, and the options are compared on the original cost scale before one is chosen.
Two-Part Structure
One part models whether any cost occurred and the other the amount among those with costs, and the two are combined into an overall mean with an interval for the difference.
GLM for the Mean
A generalized linear model with a log link and a family chosen from the variance pattern estimates mean cost directly, within Regression & Predictive Modeling.
Retransformation
If costs are modeled on the log scale, predictions are converted back with a correction such as a smearing factor, whose validity depends on similar error spread across patients.
Family and Link Checks
Residual plots, a check of the variance function and a link check guide the choice of family, and predicted and observed costs are compared across risk groups.
Intervals for Mean Differences
Intervals for mean differences from a two-part model come from the delta method or from Bootstrapping, which resamples patients so that both parts are carried together.
Price Year and Clustering
Costs are adjusted to a base year, patients are grouped by hospital or over time, and results follow the conventions of Health Economics.
COST ANALYSIS FLAWS
Cost Analysis Habits That Misstate the Mean
A tidy cost table can hide any of these habits, and each one moves the reported mean away from the figure a budget holder needs.
Logged Costs Reported as Means Estimates from a log-scale model are reported as mean differences in cost without converting back, so the result describes geometric rather than arithmetic means.
Zeros Dropped Patients with no costs are removed to allow a log transformation, which changes the population and overstates the cost of the typical patient.
Outliers Deleted The largest bills are deleted as outliers, though they are real spending and often drive total cost, so the mean no longer matches the spending it was meant to describe.
Normal Theory on Raw Costs A t-test or linear model is applied to raw costs and the interval is trusted without examining the tail, where the coverage of such intervals can be poor.
Inflation Ignored Costs from different years are pooled at nominal values, so a trend in prices is read as a trend in resource use.
Hospitals Treated as Identical Patients within a hospital share prices and practice patterns but are analyzed as independent, which narrows the intervals.
DELIVERABLES
Cost Model Files and Mean-Difference Tables
The cost variable is documented as carefully as the model, because a mean difference is only as meaningful as the costs that went into it.
Cost Definition Sheet The cost components included, the price year, the currency and the handling of zero and negative amounts, so that the dependent variable is fully specified.
Distribution Profile The share of zeros, the shape of the positive costs and the largest observations, shown before any model is chosen, with the pull of the tail on the mean.
Cost Model Comparison Candidate cost models with their fit to the observed mean and predicted costs by decile, so the choice of the reported model is documented.
Mean Difference Estimates Adjusted average cost per patient in each group and the difference with its 95% confidence interval, with the two-part results shown separately.
Tail Sensitivity Results Results with the highest-cost patients included, truncated at a stated threshold and modeled separately, so that the dependence on a few bills is visible.
Cost Variable and Model Code Code that builds the cost variable from the source records, fits each model and reproduces every table, with the price adjustment applied in one place.
ILLUSTRATIVE EXAMPLE
Comparing Annual Costs With Many Zeros
An illustration of how two-part and gamma models were compared for annual costs in a program evaluation.
ILLUSTRATIVE EXAMPLE · HOME-BASED CARE PROGRAM COST RESEARCH · UNITED STATES
A health services researcher evaluating a home-based care program wanted to compare average annual costs between enrolled patients and a comparison group drawn from the same insurer's records.
Many patients had no costs in some years, and a few had very large inpatient bills. A single model of logged costs would have excluded the zeros and answered a question about geometric means. The researcher and the statistician compared a two-part model with a gamma model with a log link, judging each by how well it reproduced the observed mean cost across predicted-risk groups. Enrollees had spent more than the comparison group in the year before enrollment, so prior-year cost entered both parts of the model as a covariate, and the difference was presented as an association, not a program effect. The interval for the mean difference came from resampling patients, and the result was shown with and without the largest bills.
Outcome: The researcher received the adjusted mean cost in each group with the difference and its 95% confidence interval, the cost model comparison, the tail sensitivity results and the code.
This example does not describe a real client or project. We never share details of actual client work, in line with the confidentiality we promise every researcher. This illustrative example is included to show the type, scope, and standard of work involved in this kind of analysis.
SOFTWARE
Cost Models Across Four Packages
Large claims files favor a package that handles them efficiently, and the two-part structure needs either a dedicated command or a short script to combine its parts.
HOW WE ASSESS YOUR PROJECT
We Review Your Actual Research
Your assessment is based on a review of your actual research materials and analytical requirements, not a generic project category.
You Submit Your Project Details
Share whatever is available at the current stage, such as the research aim, protocol or proposal, dataset, variable list, manuscript or statistical requirements.
We Review Your Research and Define the Scope
Your statistically trained Research Coordinator reviews the materials to understand the study design, research questions, data structure, analytical requirements and expected deliverables. If clarification is needed, additional documents or information can be requested before the assessment is finalized.
Your Analysis Is Completed and Delivered
Once the scope and fixed project fee are agreed, the in-house statistician completes the work and the Research Coordinator remains the communication point through delivery, with the analysis, deliverables and timeline as agreed.
RESEARCH RESPONSIBILITY
Economic Meaning Is the Researcher's to Draw
Statistical care cannot repair a cost variable built from the wrong perspective, so the perspective, the components counted and the policy reading of any difference are settled by the research team.
Agreed Statistical Support OnlineSPSS provides the agreed methodological, analytical and statistical reporting support, defined in a scope that is confirmed before any work begins.
No Intellectual Contribution OnlineSPSS does not claim any intellectual contribution to your research. Authorship of the evaluation report or article remains yours.
Your Research Decisions The perspective of the analysis, the cost components, the interpretation of the findings and the conclusions remain yours, with overall responsibility.
Confidential Handling Research data and project details are handled confidentially, project information is not published, and an NDA is available where required.
FREQUENTLY ASKED QUESTIONS
Families, Two Parts and Censored Costs
Positive costs need a variance family, two parts need combining, and follow-up that ends early needs a stated assumption.
What does healthcare cost data analysis cover?
Healthcare cost data analysis covers the construction of a cost variable and the modeling of skewed, zero-heavy spending, with estimates reported as mean costs and mean differences with confidence intervals. It applies to claims, trial and hospital records alike, and the wider clinical field is covered under Medical, Health & Clinical Research.
How is the variance family chosen for positive costs?
From the relation between the mean and the variance in the data. A modified Park test regresses the squared residuals on the log of predicted costs, and its slope points toward a family: about 1 for Poisson-like variance, 2 for gamma and 3 for inverse Gaussian. Residual checks across predicted-cost groups then confirm the choice.
What is a two-part model, and when is it needed?
A two-part model separates two processes: whether a patient has any cost, usually modeled with a logit or probit, and how much they cost given that they have some, usually with a gamma or log-scale model. It is useful when zeros are common and the factors behind having any cost may differ from those that drive its size. When zeros are rare, a single generalized linear model may be enough.
How are costs analyzed when some follow-up is incomplete?
Costs are censored when patients leave before the end of the period, and a mean taken only from complete records is biased when the reason for leaving relates to health. Inverse probability weighting of complete cases, or modeling costs by interval, gives a mean for the full period under a stated assumption, and the share of censored patients is reported.
How do you protect my research data and confidentiality?
Your data and project details are handled confidentially, and project information is not published. Researcher names and institutions are not used publicly without permission. An NDA is available where required and can be arranged before sensitive materials are shared. Read more about confidentiality and data security.
What happens when I request an assessment, and how long does it take?
You share your research question, design and relevant materials, such as the cost data dictionary, the price year and the dataset, and a statistically trained Research Coordinator reviews the request and responds the same day. The analysis, deliverables, timeline and one fixed project fee are then confirmed before any work begins, so the timeline follows from the agreed scope.
Still have a question? Find more answers in our full FAQ.
NEXT STEP
Mean Costs Estimated on the
Scale Decisions Use
A cost difference reported on the log scale or after dropping zeros can be precise and still answer a question no decision-maker asked; the arithmetic mean over all patients is usually what a spending decision needs.
No Commitment Required
Strictly Confidential
Fixed Project Fee
In-House PhD-Level Statisticians
Same-Day Response
Serving Researchers Since 2014