simCostData {ccostr} | R Documentation |

## Simulates censored cost data

### Description

This function can be used to demonstrate the bias and coverage of the estimators in the ccmean function

### Usage

```
simCostData(n = 100, dist = "unif", censor = "light",
cdist = "exp", L = 10)
```

### Arguments

`n` |
Number of individuals to simulate |

`dist` |
Survival distribution either "unif" = unif(0,10) o r "exp" = exp (1/6) |

`censor` |
Censoring "light" ~ 25% or "heavy" ~ 40%, changes a bit depending on cdist |

`cdist` |
Distribution used to censor, "exp" exponential or "unif" uniform |

`L` |
Number of years to summarize over |

### Details

The function simulates survival times from either an uniform distribution or an exponential distribution, and a cost history. There are two options for censoring, heavy (~40 light (~25

### Value

Simulation of censored cost

### References

Lin DY, Feuer EJ, Etzioni R, Wax Y (1997).
“Estimating Medical Costs from Incomplete Follow-Up Data.”
*Biometrics*, **53**(2), 419.
ISSN 0006341X, doi: 10.2307/2533947.

### Examples

```
# The simulated data can be used to show how the estimators perform
simCostData(n = 100, dist = "unif", censor = "light", cdist = "exp", L = 10)
```

*ccostr*version 0.1.0 Index]