Description Usage Arguments Details Value Note Author(s) References See Also Examples

CSInter is useful to determine the effects of a third variable on the association between an exposure and an outcome. CSInter produces 2 by 2 tables with stratum specific risk ratios, attributable risk among exposed and population attributable risk. Note that the outcome and exposure variable need to be numeric and binary and coded as "0" and 1". The third variable needs to be numeric, but may have more categories, such as "0", "1" and "2".

1 |

`x` |
data.frame |

`cases` |
string: illness binary variable (0 / 1) |

`exposure` |
string: exposure binary variable (0 / 1) |

`by` |
string: stratifying variable (a factor) |

`table` |
boolean - TRUE if you need to display interaction table |

`full` |
boolean - TRUE if you need to display useful values for formatting |

CSInter is useful to determine the effects of a third variable on the association between an exposure and an outcome. CSInter produces 2 by 2 tables with stratum specific risk ratios, attributable risk among exposed and population attributable risk. Note that the outcome and exposure variable need to be numeric and binary and coded as "0" and 1". The third variable needs to be numeric, but may have more categories, such as "0", "1" and "2".

CSInter displays a summary with the crude RR, the Mantel Haenszel adjusted RR and the result of a "Woolf" test for homogeneity of stratum-specific RR.

The option full = TRUE provides you with useful formatting information, which can be handy if you're using "markdown".

list:

`df1` |
data.frame - cross-table |

`df2` |
data.frame - statistics |

`df1.digits` |
integer vector - digit number displayed for kable/xtable |

`df2.digits` |
integer vector - digit number displayed for kable/xtable |

- You can use the lowercase command "csinter" instead of "CSInter" - The "by" variable (the stratifying variable) can have more than 2 levels

jean.pierre.decorps@gmail.com

csinter for Stata by *Gilles Desve*

CS, CSTable

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
library(EpiStats)
data(Tiramisu)
DF <- Tiramisu
# Here you can see the association between wmousse and ill for each stratum of tira:
csinter(DF, "ill", "wmousse", by = "tira")
# By storing the results in the object "res", you can use individual elements
# of the results. For example if you would like to view just the Mantel-Haenszel
# risk ratio for beer adjusted for tportion, you can view it by typing:
res <- CSInter(DF, "ill", "beer", "tportion", full = TRUE)
res$df2$Stats[3]
``` |

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.