Displaying 20 results from an estimated 41 matches for "mantelhaen".
2006 Feb 17
2
creating 3-way tables for mantelhaen.test
...a.frame
rank.by.Y1<-order(mydata[,8])
sorted.mydata<-mydata[rank.by.Y1,]
after that, I replaced Y1's values with values ranging from 1 to 10 ( 1
represents the lowest group on Y1 and 10 presents the hight group on Y1).
Now Y1 becomes a grouping variable.
What I like to do is to apply mantelhaen.test for each binary variable pair
(e.g, X1 and X2, X1 and X3, X1 and X4, .... , X6 and X7)
In order to apply mantelhaen.test, a 3-dimensional contingency table is
required.
Could you provide some advice on how to create a 3-dimensional contingency
table (first dimension represents the first v...
2008 Nov 20
1
About continuity correction option in the mantelhaen.test function.
Hello,
I was using the mantelhaen.test function (2x2 J tables for
conditional independence testing). I noticed that the option for the
continuity correction (correction=T or correction=F) sometimes made a
difference while sometimes it did give the same results regardless of
correction=T or correction=F.
Does the continuity corre...
2005 Jul 08
1
exact conditional mantelhaen.test estimate is 0 ?!
Dear listers,
I am trying to compute the exact conditional test given strata margins
of a 2 by 2 by K array using the mantelhaen.test function to get a
common odds ratio estimate.
The estimate for the test on the following data is 0, which in my
opinion dosen't make any sense.
x <- array(c(53, 6098, 1006, 4521, 63, 8070, 1163, 6137), dim=c(2,2,2))
x
, , 1
[,1] [,2]
[1,] 53 1006
[2,] 6098 4521
, , 2
[,...
2005 Apr 07
2
about mantelhaen.test (PR#7779)
Full_Name: Chien-yu Peng
Version: 2.0.1
OS: Windows XP Professional
Submission from: (NULL) (140.109.72.181)
Dear all:
Although I don't know you, I am thankful for your help.
When I use the function mantelhaen.test for R x C x K (R, C > 2) table,
the output is not the same as SAS's. I don't know that the result consist with
one of SAS's. But it works correctly for 2 x 2 x K table.
In addition, the function mantelhaen.test does not contain such as test for
general association, test for row...
2007 Jul 01
1
How to save results from chisq.test or mantelhaen.test to file
Hi,
I am new to these functions. I'm wondering if there is anyway to save the entire results (all attributes of the result object) from the chisq.test or mantelhaen.test functions? For example, from chisq.test function, you will have statistic, parameter, p.value, expected, etc. in the result list. How can I save all of them in one shot to, says, a text file or csv file? Thank you.
- adschai
2005 Apr 26
1
mantelhaen.test for more than two groups?
...oup variables.
Could you please tell me if this is possible in R - and if yes how I am
supposed to do this?
By now I get an error message:
>MyData<-array(c(21,6,0,18,8,1,46,9,2,12,8,1,35,3,7,9,2,8,58,5,11,3,2,4,14,0,0,21,0,0,26,0,0,12,0,0,32,0,0,25,0,0,62,0,0,16,0,0),dim=c(3,2,2,2,2))
>mantelhaen.test(MyData)
Error in mantelhaen.test(MyData) : x must be a 3-dimensional array
>
I'm using R Version 1.9.1 on a Linux machine.
I apologize in case I am completely wrong by choosing this test, which
might be the fact as this is my very first struggle with statistics... :)
In the hope of...
2013 Mar 12
1
Testing for significance of overlap in three sets - mantelhaen test?
...385,6256,
48,97,274,9555),
dim = c(2,2,2),
dimnames = list(
Is_C = c('Yes','No'),
Is_B = c('Yes','No'),
Is_A = c('Yes','No')))
## test
mantelhaen.test(myrabbit, exact = TRUE, alternative = "greater")
###################### end code
Is this the right test (alongwith the current parameters) to determine what
I want or is there a more appropriate test for this?
many thanks!!
[[alternative HTML version deleted]]
2006 Oct 31
0
about mantelhaen.test (PR#7779)
...ot;result"),
and uncomment all the commented lines at the end.)
I am an R newbie by any standard, so if anyone could clue me in on how
to use htest in the case of multiple statistics and dfs, that would be
great.
Once we have that, does that mean that this can serve as a good
replacement for mantelhaen.test() in R?
Any comments appreciated!
code follows:
------
# takes a 3-d array x, scores for rows, and scores for columns
# runs nominal-nominal, ordinal-nominal, and ordinal-ordinal CMH tests
# this function is based on one posted at
# http://bugs.r-project.org/cgi-bin/R/wishlist?id=3D7779;user...
2012 Sep 18
1
Cochran-Mantel-Haenszel test
...ween depth
in summer vs. winter, and day vs. night, controlling first for season
and then for time of day. I carried out a Cochran-Mantel-Haenszel test,
using Average Frequency (Avrg) as the dependent variable (2x2x8
contingency table).
> ct<-xtabs(Avrg~Time+Depth+Season,data=HG03.dat)
> mantelhaen.test(ct)
Cochran-Mantel-Haenszel test
data: ct
Cochran-Mantel-Haenszel M^2 = 28.4548, df = 7, p-value = 0.0001818
> ct<-xtabs(Avrg~Season+Depth+Time,data=HG03.dat)
> mantelhaen.test(ct)
Cochran-Mantel-Haenszel test
data: ct
Cochran-Mantel-Haenszel M^2 = 111.59...
2005 Oct 18
4
Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio
Dear all,
I have been trying to find a function to calculate the Breslow-Day test for
homogeneity of the odds ratio in R. I know the test can be preformed in SAS
but i was wondering if anyone could help me to perform this in r.
In addition i have the fullrefman file to search for functions in the basic
R packages, does anyone have any suggestions of an efficient way of
searching for
2013 Apr 24
2
Regression on stratified count data
...1 2 88
2 2 1 7
2 2 2 95
age:
1:<40y
2:>40y
case:
1:patient
2:health
oc:
1:use drug
2:not use drug
My purpose:
Anaysis whether case and oc are correlated, and age is a stratified variable.
My solution:
1,Mantel-Haenszel test by using function "mantelhaen.test"
2,loglinear regression by using function glm(count~case*oc,family=poisson).But I don't know how to handle variable "age",which is the stratified variable.
Many thanks for your help.
My best.
[[alternative HTML version deleted]]
2007 Feb 24
1
Woolf's test, Odds ratio, stratification
Just a general question concerning the woolf test (package vcd), when we have
stratified data (2x2 tables) and when the p.value of the woolf-test is
below 0.05 then we assume that there is a heterogeneity and a common odds
ratio cannot be computed?
Does this mean that we have to try to add more stratification variables
(stratify more) to make the woolf-test p.value insignificant?
Also in the
2009 Feb 09
2
R equivalent of SAS Cochran-Mantel-Haenszel tests?
In SAS, for a two-way (or 3-way, stratified) table, the CMH option in
SAS PROC FREQ gives
3 tests that take ordinality of the factors into account, for both
variables, just the column variable
or neither. Is there an equivalent in R?
The mantelhaen.test in stats gives something quite different (a test of
conditional independence for
*nominal* factors in a 3-way table).
e.g. I'd like to reproduce:
*-- CMH tests;
proc freq data=sexfun order=data;
weight count;
tables husband * wife / cmh chisq nocol norow;
run;...
2003 Apr 11
1
Pearson's Chi-squared Test
...7, 10,
5, 7, 2, 0,
16, 6, 5, 1),
dim = c(2, 2, 3),
dimnames = list(
Active = c("Female", "Male"),
Placebo = c("Female", "Male"),
Outcome.Level = c("None", "Some", "Marked")))
mantelhaen.test(x)
and now X-squared=2.0863
What is wrong?
Best regards
Many thanks in advance
Jorge M.
2005 Oct 19
0
mid-p CIs for common odds ratio
mantelhaen.test() gives the exact conditional p-value (for independence) and confidence intervals (CIs)for the common odds ratio for a stratified 2x2 table. The epitools package by Tomas Aragon (available via CRAN) contains functions which use fisher.test() to calculate mid-p exact p-values and CIs for the CM...
2018 Jan 26
2
bugzilla issues
tl;dr is the R bug tracker down or am I being an idiot? Help please ...
----
I decided I would follow up on
https://stat.ethz.ch/pipermail/r-devel/2018-January/075410.html
(reporting/suggesting a patch for an issue in stats::mantelhaen.test()
with large data sets)
Reading the instructions at https://www.r-project.org/bugs.html
suggests that if I'm sure I have found something worthy of posting to
the R bug tracker, I should go to https://bugs.r-project.org/bugzilla3
This results in
====
Software error:
Can't locate E...
2006 Sep 18
1
Cochrans Q Test
...,"Drug A Favorable"=c("B
Favorable","B Unfavorable"))))
L <- as.table(matrix(c(2,4,6,6),ncol=2, dimnames = list("C" =
c("Favorable","Unfavorable"),"Drug A Unfavorable"=c("B Favorable","B
Unfavorable"))))
mantelhaen.test(J,L, alternative="t")
But this is obviously the wrong function.
Then I googled and found (different data):
K <- as.table(matrix(c(1,1,0,0, 1,1,0,1, 1,1,1,1, 1,1,1,1, 1,0,0,0,
1,1,1,1, 1,1,1,1, 0,0,0,0, 0,1,0,1, 1,1,1,1, 0,1,0,1, 0,1,0,1),ncol=12,
dimnames = list("Seating...
2000 Mar 01
1
Contingency tables as data frames
...grads aren't using
Splus.
It seems natural to read/represent a contingency table as a data
frame, with one column representing the cell counts (as in the example
appended below (data taken from Agresti, "An Introduction to
Categorical Data Analysis"). However, functions like ftable,
mantelhaen.test, chisq.test, fisher.test, etc. don't work naturally
with this representation, and instead require the user to first
manipulate the data, say by using tapply to convert the data into an
array. This is not difficult of course, but it's one of those things
that I'd rather not have to...
1998 Mar 12
2
R-beta: ctest_0_9-3_tar.tar
I'm having trouble un 'tar'ing the file ctest_0_9-3_tar.tar.
When using the command "tar -xv" on a UNIX machine I get the
"checksum error" message. When trying to use WinZip on a Win95
machine it gives an error reading the header.
I'm downloading from the CRAN site at Carnegie Mellon. Could the file
there be corrupted?
Thanks for any help, and sorry if
1998 Mar 12
2
R-beta: ctest_0_9-3_tar.tar
I'm having trouble un 'tar'ing the file ctest_0_9-3_tar.tar.
When using the command "tar -xv" on a UNIX machine I get the
"checksum error" message. When trying to use WinZip on a Win95
machine it gives an error reading the header.
I'm downloading from the CRAN site at Carnegie Mellon. Could the file
there be corrupted?
Thanks for any help, and sorry if