Two-part attributable cost of one person with the disease from a logit and a log-link model

Predicts a person's yearly spending twice from a fitted two-part model, once with the disease indicator as observed and once set to zero, and subtracts. Each prediction is the probability of any spending from the logit part, the inverse logit form of HE-FM-BINOM-007, times the expected spending if positive from the log-link part. The person's other characteristics are held in the two indices, so the same coefficients give a different cost for each person. Averaged over people with the disease the result is the regression-based estimate of Honeycutt and colleagues, carried out in HE-CF-ACE-001. The product has the arithmetic of a chance node with a zero branch (HE-FM-CHN-001), but both of its parts here are fitted regression predictions, not the branch values of a decision tree.

Signature

p_1 = exp(x_P + g_P) / (1 + exp(x_P + g_P)); p_0 = exp(x_P) / (1 + exp(x_P)); m_1 = exp(x_M + g_M); m_0 = exp(x_M); mu_1 = p_1 * m_1; mu_0 = p_0 * m_0; AC = mu_1 - mu_0
Inputs
InputsDefinitionUnit
x_PLinear index of the person in the logit part with the disease indicator at zero, the constant plus each coefficient times the person's covariatelog odds
g_PCoefficient of the disease indicator in the logit for any spendinglog odds ratio
x_MLinear index of the person in the log-link part with the disease indicator at zero, on the scale of log spendinglog currency
g_MCoefficient of the disease indicator in the log-link model for positive spendinglog of a ratio of means
Output
p_1Predicted probability of any spending in the year with the disease indicator at 1probability
p_0Predicted probability of any spending in the year with the disease indicator at 0probability
m_1Predicted spending given positive spending, disease indicator at 1currency per person a year
m_0Predicted spending given positive spending, disease indicator at 0currency per person a year
mu_1Predicted spending including the chance of none, disease indicator at 1currency per person a year
mu_0Predicted spending including the chance of none, disease indicator at 0currency per person a year
ACPredicted spending with the disease minus predicted spending for the same person without itcurrency per person a year

Function

Attributable cost estimation function by counterfactual prediction, removal order and extra stay

Maps the fitted coefficients of a spending model, a table of people by condition, or the hazards of a hospital multistate model to the spending attributable to a disease, condition or infection, each as a difference from a counterfactual that cannot be observed for the same people. HE-FM-ACE-001 compares two predictions for one person from a two-part regression, and the mean over people with the disease is the treated-mix average of HE-FM-ATE-002 with those differences as subgroup effects, while the total is HE-FM-COI-001. The attributable-fraction route is HE-FM-COI-002 for each condition, added by HE-FM-COI-003, with the fraction taken from the attributable fraction concept, so it has no separate record here. HE-FM-ACE-002 and HE-FM-ACE-003 deal with conditions that occur together, and HE-FM-ACE-004 gives the extra stay from a hospital infection, valued in bed days as in HE-FM-ALOS-006. Notation follows the Attributable Cost Estimation article.

Computational function

  • Computational function for regression standardised attributable cost over people with the disease

    Takes the fitted disease coefficients of a two-part model and, for each person with the disease, the two indices with the disease term removed, and returns each person's attributable cost, the mean, and the total for the people it represents. This is the procedure of Honeycutt and colleagues, HE-FM-ACE-001 for each person with a weighted mean of the differences. The mean is the treated-mix average of HE-FM-ATE-002 with each person as a subgroup (derived), and the total is HE-FM-COI-001. The calculator line writes out three people with equal weights; files of any size and survey weights are in the Excel, R and Python code.

    Inputs and outputs: x_P1 to x_P3 are the logit indices and x_M1 to x_M3 the level indices of the three people with the disease term removed; g_P and g_M are the disease coefficients of the logit and log-link parts; N_d is the number of people with the disease represented; d_1 to d_3 are the attributable costs of the three people in currency a year; AC_bar is their mean and B the total in currency a year. In the code w holds survey weights, equal by default.

    Assumption: The assumptions of HE-FM-ACE-001 hold (HE-AS-ACE-001 to HE-AS-ACE-003). Honeycutt and colleagues fit separate models for three age groups and apply survey weights, so a file spanning such groups is run once per group with that group's coefficients.

    Worked example (Three illustrative people): Illustrative indices and coefficients, the first two people as in HE-EX-ACE-001 and HE-EX-ACE-002, and 1,000 people represented. The mean attributable cost is 2,841.62 and the total 2,841,616. x_P1 = 1; x_M1 = 8; x_P2 = 2; x_M2 = 9; x_P3 = -0.5; x_M3 = 7.5; g_P = 0.8; g_M = 0.5; N_d = 1000; d_1 = 2038.35; d_2 = 5456.72; d_3 = 1029.78; AC_bar = 2841.62; B = 2841616

    Worked example (Disease coefficients at zero): With the same people and both coefficients at 0, every difference, the mean and the total are 0. x_P1 = 1; x_M1 = 8; x_P2 = 2; x_M2 = 9; x_P3 = -0.5; x_M3 = 7.5; g_P = 0; g_M = 0; N_d = 1000; d_1 = 0; d_2 = 0; d_3 = 0; AC_bar = 0; B = 0

    Excel: With one person per row, the logit indices in A2:A4 named LogitIndexColumn, the level indices in B2:B4 named LevelIndexColumn, the weights in D2:D4 named WeightColumn, and the coefficients in DiseaseCoefLogitCF and DiseaseCoefLevelCF, enter =EXP(A2+DiseaseCoefLogitCF)/(1+EXP(A2+DiseaseCoefLogitCF))*EXP(B2+DiseaseCoefLevelCF)-EXP(A2)/(1+EXP(A2))*EXP(B2) in C2, fill it down and name the range DifferenceColumn. A cell named MeanAttributableCost holds =SUMPRODUCT(WeightColumn,DifferenceColumn)/SUM(WeightColumn) and TotalAttributableCost holds =MeanAttributableCost*PeopleWithDisease. SUMPRODUCT treats a blank weight as 0, so a person with no weight drops out, and with every weight blank the mean returns #DIV/0!.

    R: attributable_cost <- function(xP, xM, gP, gM, w = rep(1, length(xP)), Nd = 0) { d <- plogis(xP+gP)*exp(xM+gM)-plogis(xP)*exp(xM); m <- sum(w*d)/sum(w); list(d = d, mean = m, total = m*Nd) } Called as attributable_cost(c(1, 2, -0.5), c(8, 9, 7.5), 0.8, 0.5, Nd = 1000) it gives a mean of 2841.62 and a total of 2841616; empty inputs return NaN.

    Python: def attributable_cost(xP, xM, gP, gM, w=None, Nd=0): import math; inv = lambda z: 1/(1+math.exp(-z)); d = [inv(a+gP)*math.exp(b+gM)-inv(a)*math.exp(b) for a, b in zip(xP, xM)]; w = w or [1]*len(d); m = sum(u*v for u, v in zip(w, d))/sum(w) if sum(w) > 0 else float('nan'); return d, m, m*Nd Standard library only. attributable_cost([1, 2, -0.5], [8, 9, 7.5], 0.8, 0.5, Nd=1000) returns a mean of 2841.62 and a total of 2841616, and empty lists or weights that sum to zero return nan for both.

    Test (Three illustrative people): With the first worked example and equal weights, MeanAttributableCost is compared with the hand value 2841.62 at a tolerance of 0.5. Expected result TRUE. FALSE shows a cell evaluated at the mean indices, which returns 2402.79, and a doubled (5683.23) or halved (1420.81) cell. Excel check =ABS(MeanAttributableCost-2841.62)<0.5

    Test (Weights of 2, 1 and 1): With weights 2, 1 and 1 on the same people, MeanAttributableCost is compared with 2640.80 at a tolerance of 0.5. Expected result TRUE. FALSE shows a cell that ignores the weights, which returns 2841.62, and a doubled (5281.60) or halved (1320.40) cell. Excel check =ABS(MeanAttributableCost-2640.80)<0.5

    Common error (Difference taken at the mean indices): Evaluating HE-FM-ACE-001 once at the mean of the indices returns 2,402.79 for the three people against the mean of their differences, 2,841.62, about 15% low, because the prediction is not linear in the indices (derived). The gap grows with the spread of the indices.

    Common error (Differences averaged over everyone in the survey): Honeycutt and colleagues predict for the subsample with the disease. Adding three illustrative people without the disease whose indices are lower by 1.5 on the logit and by 1.0 on the level pulls the mean to 1,888.44 from 2,841.62 (derived), which answers a question about the whole sample.

    Source: Honeycutt AA, Segel JE, Hoerger TJ, Finkelstein EA. Comparing cost-of-illness estimates from alternative approaches: an application to diabetes. Health Services Research. 2009;44(1):303-320. Section RB Approach, equations (1) and (2), the predictions for the subsample with diabetes, the age-group models and the sampling weights.

    d_1 = exp(x_P1 + g_P) / (1 + exp(x_P1 + g_P)) * exp(x_M1 + g_M) - exp(x_P1) / (1 + exp(x_P1)) * exp(x_M1); d_2 = exp(x_P2 + g_P) / (1 + exp(x_P2 + g_P)) * exp(x_M2 + g_M) - exp(x_P2) / (1 + exp(x_P2)) * exp(x_M2); d_3 = exp(x_P3 + g_P) / (1 + exp(x_P3 + g_P)) * exp(x_M3 + g_M) - exp(x_P3) / (1 + exp(x_P3)) * exp(x_M3); AC_bar = (d_1 + d_2 + d_3) / 3; B = AC_bar * N_d

Try this function

Implementations

  • Excel

    Two-part attributable cost of one person from named cells

    With the indices in LogitIndexNoDisease and LevelIndexNoDisease and the coefficients in DiseaseCoefLogit and DiseaseCoefLevel, the formulas return the probabilities in ProbSpendDisease and ProbSpendNoDisease, the levels in LevelDisease and LevelNoDisease, and the attributable cost in AttributableCostPerson. Blank coefficient cells count as 0 in the arithmetic, so a blank returns a result with no error and needs checking by eye.

    =EXP(LogitIndexNoDisease+DiseaseCoefLogit)/(1+EXP(LogitIndexNoDisease+DiseaseCoefLogit)); =EXP(LogitIndexNoDisease)/(1+EXP(LogitIndexNoDisease)); =EXP(LevelIndexNoDisease+DiseaseCoefLevel); =EXP(LevelIndexNoDisease); =ProbSpendDisease*LevelDisease-ProbSpendNoDisease*LevelNoDisease

Assumptions

  • Two-part model with a logit and a gamma log-link part

    Spending follows the two parts Honeycutt and colleagues fitted, a logit for any spending and a generalised linear model with a gamma distribution and log link for spending if positive, each containing the disease indicator. They reached that form through tests on residuals among alternatives. Manning and Mullahy report that no single estimator is best under all conditions examined and give an algorithm for choosing, so the form is a finding for each data set and not a default.

  • Prediction only for people observed with the disease

    The two predictions are made for the subsample with the disease, treating the indicator as zero in the second, as Honeycutt and colleagues do and as the per person figures of Trogdon and colleagues are defined. The result answers how much these people's spending would differ without the disease, and it applies to the rest of a population only under a further assumption.

  • Covariates exclude conditions caused by the disease

    The indices hold characteristics and conditions likely to be correlated with the disease but not caused by it. Honeycutt and colleagues left cardiovascular and renal disease out of their diabetes model, because including them would allocate part of diabetes spending to those conditions and bias the estimate downwards.

Worked examples

  • Two-part attributable cost of one illustrative person

    Illustrative coefficients and indices, not estimates from any study. The disease raises the chance of any spending to 85.8% from 73.1% and expected positive spending to 4,914.77 from 2,980.96, so predicted spending is 4,217.60 with the disease and 2,179.25 without it, an attributable cost of 2,038.35.

    x_P = 1; g_P = 0.8; x_M = 8; g_M = 0.5; p_1 = 0.8581; p_0 = 0.7311; m_1 = 4914.77; m_0 = 2980.96; mu_1 = 4217.60; mu_0 = 2179.25; AC = 2038.35
  • Same two-part coefficients for an illustrative heavier spender

    The same illustrative coefficients for a person with higher indices give an attributable cost of 5,456.72, about 2.7 times the first person's. In a model that is multiplicative in levels the effect of the disease in currency depends on the person.

    x_P = 2; g_P = 0.8; x_M = 9; g_M = 0.5; p_1 = 0.9427; p_0 = 0.8808; m_1 = 13359.73; m_0 = 8103.08; mu_1 = 12593.89; mu_0 = 7137.17; AC = 5456.72
  • Two-part attributable cost when both disease coefficients are zero

    Limiting case. With both disease coefficients at zero the two predictions coincide and the attributable cost is 0 whatever the person's indices.

    x_P = 1; g_P = 0; x_M = 8; g_M = 0; p_1 = 0.7311; p_0 = 0.7311; m_1 = 2980.96; m_0 = 2980.96; mu_1 = 2179.25; mu_0 = 2179.25; AC = 0

Common errors

  • Log-link part alone read as the attributable cost

    Using only the level part ignores the effect of the disease on whether any spending occurs and treats everyone as a spender. For the person in HE-EX-ACE-001 it gives 1,933.81 against 2,038.35, and it also overstates predicted spending in both states. The size of the error changes with the person's chance of spending (derived).

  • Scale factor dropped when the level part is least squares on log spending

    Trogdon and colleagues write the positive part as a scale factor c times exp(X beta) and give c as exp(v / 2) for log-normally distributed spending, where v is the variance of the log-scale error. Leaving c out at v = 1 divides predicted levels by 1.6487, an understatement of 39% (derived). The indices of HE-FM-ACE-001 hold the scale factor in x_M when the level part needs one.

  • Regression and attributable-fraction totals treated as interchangeable

    On the same survey data Honeycutt and colleagues obtain USD 52.9 billion of diabetes-attributable spending by regression and USD 37.1 billion by attributable fractions (HE-FM-COI-002 applied to each condition) in 2004 dollars. The authors note that the fraction approach implicitly assumes the same treatment cost with and without the disease. A figure reported without its method cannot be compared with one from the other method.

  • Attributable cost read as the saving from prevention

    HE-FM-ACE-001 says how much lower predicted spending would be if the disease were absent. Byford and colleagues describe the cost savings of preventing a disease as, to a large extent, illusory, since few diseases can be eradicated. A saving needs its own marginal estimate, as in HE-FM-ALOS-006 for bed days.

Sources

  • Honeycutt and colleagues on the regression-based approach to diabetes spending

    Honeycutt AA, Segel JE, Hoerger TJ, Finkelstein EA. Comparing cost-of-illness estimates from alternative approaches: an application to diabetes. Health Services Research. 2009;44(1):303-320. Section RB Approach, equation (1), the probability of positive spending, and equation (2), the expected spending given positive spending, with the text that multiplies the two predictions and takes the mean difference between predicted spending for each person with diabetes and predicted spending if the person did not have diabetes; the same section excludes conditions caused by diabetes. Principal Findings for USD 52.9 billion and USD 37.1 billion.

    View source →

  • Trogdon and colleagues on per person expenditure and the positive part of a two-part model

    Trogdon JG, Finkelstein EA, Hoerger TJ. Use of econometric models to estimate expenditure shares. Health Services Research. 2008;43(4):1442-1452. Section Multiplicative Models with Exponential Means, on the scale factor c and on expenditure data, and the notes to Table 2, which define per person expenditures as the average difference between predicted expenditures with and without the condition for those observed with it and describe a logit with a log-link gamma part.

    View source →

  • Manning and Mullahy on choosing among estimators for log models of spending

    Manning WG, Mullahy J. Estimating log models: to transform or not to transform? Journal of Health Economics. 2001;20(4):461-494. The abstract reports that no single alternative is best under all conditions examined and that the paper provides an algorithm for choosing among the alternative estimators.

    View source →

  • Byford and colleagues on cost savings from prevention in cost of illness studies

    Byford S, Torgerson DJ, Raftery J. Cost of illness studies. BMJ. 2000;320(7245):1335. States that the cost savings of fully or partially preventing a disease are, to a large extent, illusory, and that few diseases can be eradicated.

    View source →

Canonical Identity

This formula is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/formula/two-part-attributable-cost-of-one-person-with-the-disease-from-a-logit-and-a-log-link-model