Description Usage Arguments Value

View source: R/ir_crosstab_byfutime.R

Calculate crude incidence rates and crosstabulate results by break variables (Copy of ir_crosstab for the special case of cumulative FU-times as xbreak_var)

1 2 3 4 5 6 7 8 9 10 11 | ```
ir_crosstab_byfutime(
df,
dattype = "zfkd",
count_var,
futime_breaks = c(6, 12, 60, 120),
ybreak_vars,
collapse_ci = FALSE,
add_total = "no",
futime_var = NULL,
alpha = 0.05
)
``` |

`df` |
dataframe in wide format |

`dattype` |
can be "zfkd" or "seer" or empty. Will set default variable names from dataset. |

`count_var` |
variable to be counted as observed case. Should be 1 for case to be counted. |

`futime_breaks` |
vector that indicates split points for follow-up time groups (in months) that will be used as xbreak_var. Default is c(6, 12, 60, 120) that will result in 5 groups (up to 6 months, 6-12 months, 1-5 years, 5-10 years, 10+ years) |

`ybreak_vars` |
variables from df by which rates should be stratified in rows of result df. Multiple variables will result in appended rows in result df. y_break_vars is required. |

`collapse_ci` |
If TRUE upper and lower confidence interval will be collapsed into one column separated by "-". Default is FALSE. |

`add_total` |
option to add a row of totals. Can bei either "no" for not adding such a row or "top" or "bottom" for adding it at the first or last row. Default is "no". |

`futime_var` |
variable in df that contains follow-up time per person (in years). Default is set if dattype is given. |

`alpha` |
signifcance level for confidence interval calculations. Default is alpha = 0.05 which will give 95 percent confidence intervals. |

df

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.