Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206235

How to calculate and plot cumulative incidence rate (incidence rate) over a data of 30 years and include baseline occurrence in R

$
0
0

I am struggling with finding the R package and codes to calculate and plot the cumulative incidence rate/IR (with 95% CI) in R. I have two datasets D1 and D2 with eight events each (E1...E8) and five groups (G1...G5) each and;

In D1, I want to calculate IR (with 95% CI) and then have a separate plot for each group (G1... G5), showing E1 to E8 IR in each. Something like as follows;

enter image description here

And in D2, I want to do same calculations, except my plots should not start at zero for each event as I have prevalent cases for each event at study start date. It should be something like follows;

enter image description here

Should I start with survival analysis? is it suitable?


Viewing all articles
Browse latest Browse all 206235

Trending Articles