|
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)? |
|
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 <[hidden email]> 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. > > ______________________________________________ > [hidden email] 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]] ______________________________________________ [hidden email] 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. |
|
Thanks for your answer. The answer advertises your VCD package, which by the way is a very nice package that I use and recommend for everyone doing such kind of data analysis. However if you really examine the answer you gave me, it does not really or specifically answer my question.
|
|
On Jun 24, 2012, at 5:30 AM, francogrex wrote: > Thanks for your answer. The answer advertises your VCD package, > which by the > way is a very nice package that I use and recommend for everyone > doing such > kind of data analysis. However if you really examine the answer you > gave me, > it does not really or specifically answer my question. That's true but neither does your question offer a reproducible example, nor does you response offer the context of either the original question or the response. The thought I had looking at the original was to wonder why you were not using logistic regression or Poisson regression. > Sent from Nabble.com. > As always >>>>>>>>> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. <<<<<<<<<<<< -- David Winsemius, MD West Hartford, CT ______________________________________________ [hidden email] 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. |
|
In reply to this post by francogrex
I will try again.
1. If you have 5 groups, and split each in half, then you have 10 groups. If MH is applicable to 5 groups, then it should be applicable to the 10 groups as long as they are disjoint groups. 2. I don't think MH applies to your example because the groups do not have similar behavior. That is why I suggested you look at dose response behavior instead. 3. vcd is by David Meyer [aut, cre], Achim Zeileis [aut], Kurt Hornik [aut], Michael Friendly [ctb] Rich On Sun, Jun 24, 2012 at 5:30 AM, francogrex <[hidden email]> wrote: > Thanks for your answer. The answer advertises your VCD package, which by > the > way is a very nice package that I use and recommend for everyone doing such > kind of data analysis. However if you really examine the answer you gave > me, > it does not really or specifically answer my question. > > -- > View this message in context: > http://r.789695.n4.nabble.com/array-complexity-for-the-MH-test-tp4633999p4634318.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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]] ______________________________________________ [hidden email] 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. |
| Powered by Nabble | Edit this page |
