ccmean {ccostr} | R Documentation |
Calculates estimates of the mean cost with censored data
Description
This function calculates the mean cost for right-censored cost data over a period of L time units (days, months, years,...)
Usage
ccmean(x, L = max(x$surv), addInterPol = 0)
Arguments
x |
A dataframe with columns: id, cost, delta and surv. If Cost history is available it can be specified by: start and stop, |
L |
Limit. Mean cost is calculated up till L, if not specified L = max(surv) |
addInterPol |
This parameter affects the interpolation of cost between two observed times. Defaults to zero. |
Details
The function returns four estimates. The first two are simple and biased downwards, and included for comparison. The estimates are:
- AS: "Available Sample estimator" - The simple sample mean
- CC: "Complete Case estimator" - The mean of fully observed cases
- BT: "Weighted Complete Case estimator" - Bang and Tsiatis's estimator
- ZT: "Weighted Available estimator" - Zhao and Tian's estimator
The function needs the following in a dataframe:
- id: The id separating each individual
- cost: The total cost, or if start and stop provided the specific cost
- start: Start of cost
- stop: End of cost, if one time cost then start = stop
- delta: Event variable, 1 = event, 0 = no event
- surv: Survival
Value
An object of class "ccobject".
References
Bang H, Tsiatis AA (2000). “Estimating medical costs with censored data.” Biometrika, 87(2), 329–343. ISSN 00063444, doi: 10.1093/biomet/87.2.329.
Zhao H, Tian L (2001). “On Estimating Medical Cost and Incremental Cost-Effectiveness Ratios with Censored Data.” Biometrics, 57(4), 1002–1008. ISSN 0006341X, doi: 10.1111/j.0006-341X.2001.01002.x.
Examples
hcost
ccmean(hcost, L = 1461, addInterPol = 1)