Displaying 1 result from an estimated 1 matches for "or2x2".
2010 Sep 19
1
odds ratios for n-way tables: seeking an *apply-able method
...elements
F[i:(i+1), j:(j+1)]
What I think I want is a method to extract all such 2x2 subtables to a
structure (list?) so that I can use
*apply or plyr methods to do the computations of (log) odds ratio (& std
error) for each, and return these
in a suitable form.
Below, I define a function OR2x2 that calculates the (log) odds ratio
for one 2x2 table, and another, OR,
that uses loops to calculate what I want, at least for a two-way table.
But the programming would be
quite messy to generalize to n-way tables where all but the first two
dimensions are considered {strata}.
Can someone help...