[R] odds ratios in multiway tables (stratified)

Wim Bertels wim.bertels at khleuven.be
Thu Jul 31 14:40:22 CEST 2008


On Wed, 2008-07-30 at 12:13 -0500, Marc Schwartz wrote:
> on 07/30/2008 08:48 AM Wim Bertels wrote:
> > Hi,
> > 
> > does anyone know of a function to calculate odds ratios in multiway
> > tables (stratified) (+ the other usual statistics involved)
> > 
> > i mean:
> > say we have a table r*c*d,
> > For every d (depth) we have a r*c table,
> > and in this table the odds ratio's are calculated for every 2*2 subtable
> > in it.
> > 
> > logically this function would look like):
> > ORs(multiwaytable)
> > or
> > ORs(data$var1r,data$var2c,data$var3d)
> > 
> > (eg. not taking the lot together, keeping the paradox of simpson in
> > mind)
> > 
> > mvg,
> > Wim
> 
> In ?mantelhaen.test, there is some code in the examples using the
> UCBAdmissions data set. There is also code for the Woolf test in the 
> same example.

thanks Marc,
but CMH testing supposes a common odds ratio, (hence the woolf test)

i am looking for a way to just get all the odds ratios calculated, with
a family p-values (for each one) and/or family confidence intervals
(since i am doing multiple testing then,.. data snooping..)
[i know this is easily done in SAS, but i prefer R..]

> 
> In addition, there is similar code in the 'vcd' and 'rmeta' CRAN packages.

tnx,
structplot looks nice as an extra

mvg,
Wim


> 
> HTH,
> 
> Marc Schwartz
> 
>



More information about the R-help mailing list