You have a very nice graph of a dose-response function here.
library(vcd)
library(RColorBrewer)
Pen <- array(c(0, 0, 6, 5,
3, 0, 3, 6,
6, 2, 0, 4,
5, 6, 1, 0,
2, 5, 0, 0),
dim = c(2, 2, 5),
dimnames = list(
Delay = c("None", "1.5h"),
Response = c("Cured", "Died"),
Penicillin.Level = c("1/8", "1/4",
"1/2", "1", "4")))
mosaic(structable(aperm(Pen, c(3, 1, 2)), split_vertical=c(TRUE, TRUE,
FALSE)),
highlighting=3,
highlighting_fill=brewer.pal.ext(2,'RdYlGn',reverse=TRUE))
See our paper in the 2011 UseR conference for more information on the graph.
Heiberger, R. (Presenter & Author), Neuwirth, E. (Presenter & Author),
UserR! 2011, "Graphical Syntax for Structables and their Mosaic
Plots,"
University of Warwick and R Foundation for Statistical Computing, Coventry,
England. (August 2011).
http://web.warwick.ac.uk/statsdept/user-2011/TalkSlides/Contributed/16Aug_1600_FocusII_3-Visual_2-Heiberger.pdf
We have a MH graph on pages 15-16.
I don't think MH applies for this penicillin example, since the five dose
levels are not giving the same story. The dose-response relationship is
the story here.
Rich
On Wed, Jun 20, 2012 at 1:05 PM, francogrex <francogrex@mail.com> wrote:
> If we take the matel-haenszel test on these data of five 2x2 tables
> stratified along Penicillin.Levels
> array(c(0, 0, 6, 5,
> 3, 0, 3, 6,
> 6, 2, 0, 4,
> 5, 6, 1, 0,
> 2, 5, 0, 0),
> dim = c(2, 2, 5),
> dimnames = list(
> Delay = c("None", "1.5h"),
> Response = c("Cured", "Died"),
> Penicillin.Level = c("1/8", "1/4",
"1/2", "1", "4")))
>
> The test works fine. How would one proceed for example if within each
> Penicillin level we have two sub 2x2 tables split along the gender ...?
> I mean practically how would that array be and when you have multiple
> stratification levels how practical it is to work that into that array
> structure above? Can one not have a different data.frame structure that the
> test likes as well, or should we use another package (like the meta
> package)?
>
> --
> View this message in context:
>
http://r.789695.n4.nabble.com/array-complexity-for-the-MH-test-tp4633999.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]