Mean cost as interval costs weighted by Kaplan-Meier survival to the interval start

Estimates mean cost per patient over a follow-up period cut into costing intervals, written here term by term for three intervals (HE-IM-CEN-001 takes any number), in the form Etzioni and colleagues print as M1. Each term multiplies S_k, the Kaplan-Meier probability of being event free at the start of interval k (the step of HE-FM-ADMC-002), by c_k, the mean cost in that interval among patients still under observation at its start. A patient censored at a boundary adds cost to each interval observed and then leaves that mean, so later means rest on the patients still observed while the survival weight does not fall at a censoring. The survival values are weights on successive intervals and not the branches of one chance node as in HE-FM-CHN-001, and they do not add to 1 (2.4583 in the first worked example).

Signature

mu_C = S_1 * c_1 + S_2 * c_2 + S_3 * c_3
Inputs
InputsDefinitionUnit
S_1Probability of being event free at the start of the first interval, equal to 1 at the time originprobability
c_1Mean cost incurred in the first interval among patients under observation at its start, with a patient who has the event in the interval contributing cost until the eventcurrency per patient
S_2Kaplan-Meier probability of being event free at the start of the second intervalprobability
c_2Mean cost incurred in the second interval among patients event free and under observation at its startcurrency per patient
S_3Kaplan-Meier probability of being event free at the start of the third intervalprobability
c_3Mean cost incurred in the third interval among patients event free and under observation at its startcurrency per patient
Output
mu_CEstimated mean cost per patient over the follow-up period, counting patients still event free at its endcurrency per patient

Function

Mean cost over follow-up from censored patient records by interval

Maps censored patient records, summarised by costing interval, to an estimate of mean cost per patient over the follow-up period. The building blocks of a censored record are live and are not restated. The observed time and event indicator are the last two parts of HE-FM-ADMC-001, Y_i = min(T_i, C_i) and delta_i = (T_i <= C_i), whose Content also covers a censoring time set by loss to follow-up. The log-likelihood contribution, delta_i log f(X_i) plus (1 minus delta_i) log S(X_i), is the form stated in HE-FM-LTR-004 with its entry term gone, since HE-VR-LTR-019 sets L_i to 0 for a record observed from the origin, and HE-FM-LTR-004 gives the Weibull case and HE-FM-LTR-003 the exponential rate. The Kaplan-Meier step is HE-FM-ADMC-002 and the restricted mean is HE-FM-ADMC-003. What this page adds is the estimator the article describes for costs, which weights the mean cost of each interval by Kaplan-Meier survival to its start. The other interval form, the event probability in each interval times the mean total cost of those with the event, with a survivor branch where follow-up is limited, is a probability-weighted sum over exclusive branches and is HE-FM-CHN-001, and the inverse-probability weighted alternative is HE-FM-DCEN-004. Notation follows the Censoring article.

Computational function

  • Computational function for survival-weighted mean cost and naive averages from censored patient records

    Turns patient records with a time, a status and costs by interval into the survival-weighted mean cost of HE-FM-CEN-001, with the two naive averages it replaces and a check that censoring falls on the interval boundaries. Within an interval whose censoring is all at its boundaries, the Kaplan-Meier product over the event times telescopes to one minus events over patients at risk at the start, so the step of HE-FM-ADMC-002 applies to whole intervals (derived). The full-sample mean equals the sum of interval totals over the starting number of patients (derived).

    Inputs and outputs: n_1, n_2, n_3 are the patients under observation at each interval start (those with a time after it), d_1, d_2, d_3 the events in each interval and C_1, C_2, C_3 the total observed cost in each interval, in currency. The chain returns the survival S_2, S_3, S_4, the interval means c_1, c_2, c_3, the estimate mu_C, the full-sample mean M_F and the gap G. The R and Python code take time, status (1 for an event, 0 for censoring), a cost matrix with one row per patient and one column per interval, and the interval width, and also return the uncensored-case mean and boundary, TRUE when every censored time sits on a boundary or beyond the last interval. Cost cells after a patient's time are not read. The boundary check compares exactly, so times and width are held in whole months or another exact unit, since a decimal width such as 0.1 can flag a time on a boundary as off it.

    Assumption: As in HE-AS-CEN-001 to HE-AS-CEN-005. An event at a boundary is counted in the interval ending there, and a patient censored at a boundary is observed through the interval ending there and leaves before the next.

    Worked example (six patients): With the illustrative costs of HE-EX-CEN-001, n_1 = 6; d_1 = 1; C_1 = 17400; n_2 = 4; d_2 = 1; C_2 = 6000; n_3 = 2; d_3 = 1; C_3 = 2400 gives S_2 = 0.8333; S_3 = 0.625; S_4 = 0.3125; c_1 = 2900; c_2 = 1500; c_3 = 1200; mu_C = 4900; M_F = 4300; G = 600. The survival values are the article's Kaplan-Meier values at months 4, 8 and 12. The uncensored-case mean from the code is 4,100.

    Worked example (no censoring): With the records of HE-EX-CEN-002, n_1 = 4; d_1 = 1; C_1 = 6000; n_2 = 3; d_2 = 1; C_2 = 2700; n_3 = 2; d_3 = 1; C_3 = 1500 gives S_2 = 0.75; S_3 = 0.5; S_4 = 0.25; c_1 = 1500; c_2 = 900; c_3 = 750; mu_C = 2550; M_F = 2550; G = 0.

    Excel: With one row per interval in rows 2 to 4, patients at risk in column B, events in column C and total observed cost in column D, enter 1 in E2, =E2*(1-C2/B2) in E3 and fill it down to E5, =D2/B2 in F2 and fill it down to F4, =SUMPRODUCT(E2:E4,F2:F4) in MeanCostEstimate, =SUM(D2:D4)/B2 in FullSampleMean and =MeanCostEstimate-FullSampleMean in CensoringCostGap. A blank or zero at-risk cell returns #DIV/0!, so an interval with nobody under observation is deleted from the table.

    R: cen_cost <- function(time, status, cost, width) { K <- ncol(cost); at <- lapply(seq_len(K), function(k) which(time > (k-1)*width)); K <- sum(lengths(at) > 0); at <- at[seq_len(K)]; n <- lengths(at); d <- vapply(seq_len(K), function(k) sum(status[at[[k]]] == 1 & time[at[[k]]] <= k*width), 0); m <- vapply(seq_len(K), function(k) mean(cost[at[[k]], k]), 0); S <- cumprod(c(1, 1-d/n)); tot <- rowSums(cost[, seq_len(K), drop = FALSE] * outer(time, (seq_len(K)-1)*width, ">"), na.rm = TRUE); list(n = n, d = d, S = S[seq_len(K)], S_end = S[K+1], c = m, mu = sum(S[seq_len(K)]*m), full_sample = mean(tot), uncensored = mean(tot[status == 1]), boundary = all(status == 1 | time %% width == 0 | time > K*width)) } With time <- c(2, 4, 5, 8, 9, 12); status <- c(1, 0, 1, 0, 1, 0); cost <- rbind(c(2400, NA, NA), c(3000, NA, NA), c(3000, 1500, NA), c(3600, 1800, NA), c(3000, 1500, 900), c(2400, 1200, 1500)), cen_cost(time, status, cost, 4) returns mu 4900, full_sample 4300, uncensored 4100 and boundary TRUE. With no events uncensored is NaN, with no patients mu is 0 and the two means are NaN, and intervals with nobody under observation are dropped, all without an error.

    Python: With import itertools, def cen_cost(time, status, cost, width): at = [[i for i, t in enumerate(time) if t > k*width] for k in range(len(cost[0]) if cost else 0)]; at = [a for a in at if a]; K = len(at); n = [len(a) for a in at]; d = [sum(1 for i in a if status[i] == 1 and time[i] <= (k+1)*width) for k, a in enumerate(at)]; m = [sum(cost[i][k] for i in a)/len(a) for k, a in enumerate(at)]; S = list(itertools.accumulate([1.0]+[1-x/y for x, y in zip(d, n)], lambda p, q: p*q)); tot = [sum(cost[i][k] for k, a in enumerate(at) if i in a) for i in range(len(time))]; unc = [x for x, s in zip(tot, status) if s == 1]; return dict(n=n, d=d, S=S[:K], S_end=S[K], c=m, mu=sum(s*x for s, x in zip(S, m)), full_sample=sum(tot)/len(tot) if tot else None, uncensored=sum(unc)/len(unc) if unc else None, boundary=all(s == 1 or t % width == 0 or t > K*width for t, s in zip(time, status))) With the six patients as lists and None for unobserved cells, cen_cost(time, status, cost, 4) returns mu 4900.0, full_sample 4300.0, uncensored 4100.0 and boundary True. With no events uncensored is None, with empty lists mu is 0 and both means are None, and with width 3 on the same times (and four columns of cost) boundary is False.

    Test (six patients): MeanCostEstimate is compared with 4,900, the hand value from S_2 of 5/6 and S_3 of 5/8. Expected result TRUE. A survival column that divides the second interval's events by the starting 6 patients gives S_3 of 0.6944, an estimate of 4,983.33 and FALSE, and doubling the cell to 9,800 or halving it to 2,450 also gives FALSE. Excel check =ABS(MeanCostEstimate-4900)<0.01

    Test (no censoring): With the inputs of the no censoring example, MeanCostEstimate is compared with FullSampleMean, 2,550, a different route through the interval totals. Expected result TRUE. Doubling MeanCostEstimate to 5,100 or halving it to 1,275 gives FALSE, and on the six-patient inputs the test is FALSE by the gap of 600, the effect of censoring. Excel check =ABS(MeanCostEstimate-FullSampleMean)<0.01

    Common error (Intervals cut across the censoring times): Width 3 on the six patients places the censoring times 4 and 8 inside intervals, so a patient is counted as under observation for an interval only partly seen. The code flags this with boundary False, and Lin and colleagues state consistency for boundary censoring and report small biases in numerical studies otherwise.

    Source: Lin DY, Feuer EJ, Etzioni R, Wax Y. Biometrics. 1997;53(2):419-434, abstract, for the estimator and the boundary condition. Etzioni RD, Feuer EJ, Sullivan SD, Lin D, Hu C, Ramsey SD. Journal of Health Economics. 1999;18(3):365-380, section 3, equation 2, for the printed form.

    S_2 = 1 - d_1 / n_1; S_3 = S_2 * (1 - d_2 / n_2); S_4 = S_3 * (1 - d_3 / n_3); c_1 = C_1 / n_1; c_2 = C_2 / n_2; c_3 = C_3 / n_3; mu_C = c_1 + S_2 * c_2 + S_3 * c_3; M_F = (C_1 + C_2 + C_3) / n_1; G = mu_C - M_F

Try this function

Implementations

  • Excel

    Censored mean cost from survival and interval mean cost ranges

    With survival at each interval start in a range named SurvivalAtStart, whose first cell holds 1, and the interval means in a range named IntervalMeanCost of the same size, the formula returns the estimate in a cell named MeanCostEstimate for any number of intervals. A cell named FullSampleMean holds =AVERAGE(PatientTotalCost), where PatientTotalCost lists each patient's observed total, for the checks below. SUMPRODUCT treats a blank or text cell in either range as 0, so an interval left blank drops out of the sum without an error, and ranges of unequal size return #VALUE!.

    =SUMPRODUCT(SurvivalAtStart,IntervalMeanCost)

Assumptions

  • Censoring only at the boundaries of the costing intervals

    Lin and colleagues state that their estimators are consistent if censoring occurs solely at the boundaries of the intervals, and report small biases in numerical studies even when censoring may occur inside them. Wijeysundera and colleagues name this requirement as a limitation of the method. The intervals are therefore chosen with the censoring times in mind, as in the first worked example, where 4-month intervals place all three censoring times on a boundary.

  • Non-informative censoring on the time scale for the survival weights

    S_k is a Kaplan-Meier estimate, so it carries the non-informative condition of HE-SR-ADMC-001, that those censored are as likely to have a later event as those still observed. Censoring that is non-informative for time is still not so for cumulative cost, which is why the survival estimate is made on the time scale and never on the cost scale (HE-ER-DCEN-009).

  • Cost histories recorded by interval for each patient

    Etzioni and colleagues state this form for individual cost histories recorded as costs per unit time. Where only each patient's total at death or censoring is held, c_k cannot be computed, and the event-probability form of HE-FM-CHN-001, which Etzioni and colleagues give for that case, or HE-FM-DCEN-004 applies.

  • Patients observed at an interval start standing for all those event free then

    Lin and colleagues describe the second factor as an estimator of the average cost over the interval conditional on surviving to its start. Taking c_k from the patients still under observation treats them as representing every patient event free at that point (derived). If those who stay under observation spend differently from those censored at the boundary, c_k leans towards the spending of those who stay (derived).

  • Result restricted to the period the intervals cover, in one price year

    The sum stops at the end of the last interval. Etzioni and colleagues read this form, when follow-up stops at I months, as the average cost for all individuals including survivors over I months, with those dying before I contributing costs until death and those alive at I contributing cumulative costs until I. Costs are in one price year and undiscounted, and c_k is not negative.

Worked examples

  • Six patients of the censoring article with illustrative interval costs

    The article's six illustrative patients have progression at months 2, 5 and 9 and censoring at months 4, 8 and 12, so 4-month intervals place every censoring time on a boundary. The costs are illustrative and stop at progression. In the first interval patients A to F cost 2,400, 3,000, 3,000, 3,600, 3,000 and 2,400, a mean of 17,400 / 6 = 2,900. In the second, patients C to F cost 1,500, 1,800, 1,500 and 1,200, a mean of 6,000 / 4 = 1,500. In the third, patients E and F cost 900 and 1,500, a mean of 2,400 / 2 = 1,200. S_2 and S_3 are the article's Kaplan-Meier values at months 4 and 8, and the estimate is 4,899.95, or 4,900 with S_2 held as 5/6.

    S_1 = 1; S_2 = 0.8333; S_3 = 0.625; c_1 = 2900; c_2 = 1500; c_3 = 1200; mu_C = 4899.95
  • Illustrative complete records where the estimate equals the sample mean

    Four illustrative patients are followed for three 4-month intervals with no censoring before the end of the third. W has the event in the first interval, costing 1,000. X costs 2,000 and then 600 with the event in the second. Y costs 2,000, 1,200 and then 500 with the event in the third. Z remains event free, costing 1,000, 900 and 1,000. The interval means are 1,500, 900 and 750, and the estimate of 2,550 equals the sample mean of the patient totals 1,000, 2,600, 3,700 and 2,900 (derived, since each survival weight then equals the share of patients still observed, so each term is that interval's total over all patients). Etzioni and colleagues show with a table of patients by periods that M1 and the event-probability form M2 are identical when there is no censoring.

    S_1 = 1; S_2 = 0.75; S_3 = 0.5; c_1 = 1500; c_2 = 900; c_3 = 750; mu_C = 2550
  • Limiting case of no events during the costing intervals

    With no events in the period every survival weight is 1, and the estimate reduces to the sum of the interval means. Using the illustrative means of the first worked example it gives 5,600, an upper limit for those means. The case checks an implementation.

    S_1 = 1; S_2 = 1; S_3 = 1; c_1 = 2900; c_2 = 1500; c_3 = 1200; mu_C = 5600

Common errors

  • Averaging observed costs over all patients despite censoring

    Averaging each patient's observed total gives 4,300 in the first worked example, 12.2% below the estimate of 4,899.95, because costs after censoring are never seen. Lin and colleagues state that this naive average can be severely biased, and Wijeysundera and colleagues call the full-sample estimator an underestimate for the same reason.

  • Averaging costs over uncensored patients only

    Keeping only patients A, C and E gives 4,100 in the first worked example, 16.3% below the estimate of 4,899.95. Lin and colleagues state that the average from uncensored cases can also be severely biased, and Wijeysundera and colleagues explain that it leans towards the costs of those who died early, whose chance of remaining uncensored was highest.

  • Dividing interval costs by all patients in place of those still observed

    Dividing each interval's total by 6 gives means of 2,900, 1,000 and 400 and an estimate of 3,983.30 in the first worked example. Patients who have had the event are then removed twice, once in the mean and once in the survival weight, and censored patients count as zero cost in the later means, so the result falls below even the full-sample mean of 4,300 (derived).

  • Reading the estimate as lifetime cost

    The sum covers only the costing intervals. In the first worked example 31% of patients are estimated to be event free at month 12, so 4,899.95 leaves out all their later costs. Lifetime cost needs follow-up across the whole range of survival times or an extrapolated curve, and Etzioni and colleagues interpret the estimate with limited follow-up as the average cost over those months only.

  • Taking the interval-deaths form as the same quantity under limited follow-up

    Without the survivor branch, the event probabilities and event-group totals of the first worked example give 3,025 with probabilities adding only to 0.6875, short of the exhaustive branches HE-AS-CHN-001 requires for HE-FM-CHN-001, and 4,400 after the rescaling Etzioni and colleagues give in their footnote, which is an average among those with the event by month 12. With the survivor branch added at patient F's 5,100 the branches are complete and HE-FM-CHN-001 gives 4,618.75, which also equals HE-FM-DCEN-004 on these records with F as a complete case (computed here). Etzioni and colleagues state that M1 and the event-probability form M2 are identical when there is no censoring, which does not hold here, so none of these is a check on 4,899.95.

Sources

  • Lin and colleagues on interval estimators of mean cost under censoring

    Lin DY, Feuer EJ, Etzioni R, Wax Y. Estimating medical costs from incomplete follow-up data. Biometrics. 1997;53(2):419-434. doi:10.2307/2533947. The abstract states that the naive sample average of observed costs from all subjects or from the uncensored cases only can be severely biased, that the time period is partitioned into small intervals, that one estimator is the sum of the Kaplan-Meier probability of being alive at the start of each interval multiplied by an estimator of the average cost over the interval conditional on surviving to its start, that the estimators are consistent if censoring occurs solely at the boundaries of the intervals, and that numerical studies show small biases even when censoring may occur inside the intervals.

    View source →

  • Etzioni and colleagues printing the survival-weighted cost estimator

    Etzioni RD, Feuer EJ, Sullivan SD, Lin D, Hu C, Ramsey SD. On the use of survival analysis techniques to estimate medical care costs. Journal of Health Economics. 1999;18(3):365-380. doi:10.1016/S0167-6296(98)00056-3. Section 3 (Alternative approaches), equation 2 prints M1 as the sum over time periods of the estimated survival probability times the average cost among patients surviving to that period, for recorded cost histories. Equations 3 and 5 print the event-probability forms M2 and M3, footnote 1 gives the rescaling of the event probabilities under limited follow-up, and the same section states that M1 and M2 are identical without censoring, how each is read when follow-up stops at I months, and that Lin and colleagues found M1 and M3 far more accurate in simulation than the Kaplan-Meier approach applied to costs.

    View source →

  • Wijeysundera and colleagues on the full-sample and uncensored case estimators

    Wijeysundera HC, Wang X, Tomlinson G, Ko DT, Krahn MD. Techniques for estimating health care costs with censored data: an overview for the health services researcher. ClinicoEconomics and Outcomes Research. 2012;4:145-155. doi:10.2147/CEOR.S31552. Section Full-sample and uncensored case estimators states that the full-sample estimator is always an underestimate because censored patients go on accruing unobserved costs, and that the uncensored case estimator is biased towards the costs of participants who died early. Section Reweighted estimators names the assumption of discrete censoring times coinciding with the beginning of the costing intervals as a limitation of the Lin 1997 estimator, and reports that it and the inverse probability weighted estimator are equivalent when the intervals become infinitesimally small.

    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/mean-cost-as-interval-costs-weighted-by-kaplan-meier-survival-to-the-interval-start