similar to: How to save results from chisq.test or mantelhaen.test to file

Displaying 20 results from an estimated 6000 matches similar to: "How to save results from chisq.test or mantelhaen.test to file"

2010 Jan 06
1
decimal value for p-value
Dear r-users,   I conducted a chi-square test using chi.test code and found that my p-value = 1.  My question is, is it possible to get the decimals form of the p-value?  Maybe the p-value is actually 0.9999 before rounding the value.   thank you so much for any help given.   [[alternative HTML version deleted]]
2006 Feb 17
2
creating 3-way tables for mantelhaen.test
Hi R users I have serveral binary variables (e.g., X1, X2, X3, X4, X5, X,6, and X7) and one continuous variable (e.g., Y1). I combined these variables using data.frame() mydata <- data.frame(X1,X2,X3,X4,X5,X6,X7,Y1) after that, I sorted this data.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
2011 Jun 24
2
text overlap in plot
Hey, Here is a snippet that generated a boxplot and separates points so that they do not overlap. I have a problem to avoir text overlapping. Any help would be helpful. > attach(InsectSprays) boxplot(count ~ spray, data = InsectSprays, outpch = NA) stripchart(count ~ spray, data = InsectSprays, vertical = TRUE, method = "jitter", pch = 21, col =
2007 Oct 15
4
boxplot() confuses x- and y-axes (PR#10345)
Full_Name: Bob O'Hara Version: 2.6.0 OS: Windows XP Submission from: (NULL) (88.112.20.250) Using horizontal=TRUE with boxplot() confuses it as to what is an x- or y-axis. At least, xlim= and ylim= are the wrong way round, log="x" (or "y") and xaxt= work as expected, I haven't looked at anything else. Some code to see if you can reproduce the bug (or discover
2006 Apr 28
2
How to get a grid behind a boxplot
I am using R 2.2.1 on a Windows 2000 PC. When I do a grid() after the boxplot it overprints the boxplot: > boxplot(count ~ spray, data = InsectSprays, col = "lightgray") > grid(nx=NA, ny=NULL) > if I try the panel.first > boxplot(count ~ spray, data = InsectSprays, col = "lightgray", + panel.first=grid(nx=NA, ny=NULL)) > I can see the grid flash
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
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
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 correction apply only in certain cases or in certain strata with some
2006 Mar 22
3
ordering boxplots according to median
Dear R-users, Does anyone knows how I can order my serie of boxplots from lowest to highest median (which is much better for visualization purposes). thanks in advance, willem [[alternative HTML version deleted]]
2004 Apr 05
1
fligner.test (ctest) (PR#6739)
Full_Name: Karel Zvara Version: 1.8.1 OS: MS Winows 2000 Submission from: (NULL) (195.113.30.163) The test statistics of the fligner.test (ctest package) depends on the order of cases: > fligner.test(count~spray,data=InsectSprays) Fligner-Killeen test for homogeneity of variances data: count by spray Fligner-Killeen:med chi-squared = 14.4828, df = 5, p-value = 0.01282 >
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
2008 May 22
2
Stripchart and Boxplots side-by-side
Dear all - With the following code I get Boxplots and Stripcharts in one Plot: with(InsectSprays, boxplot(count ~ spray, boxwex = 0.3)) with(InsectSprays, stripchart(count ~ spray, col = "red", vertical = TRUE, add = TRUE)) But the dots from the stripchart are plotted over the Boxes. Is there any possibility to have Stripchart and Boxplots side-by-side, i.e. to move boxplots and/or
2018 Feb 13
3
Suppress horizontal mean line in beanplot()
Hi, I would like to use the beanplot() function from the beanplot package. Unfortunately, I can't find out how to suppress the dashed horizontal line, that shows the overall mean. In the help I've found the argument "overallline", but it only allows for "mean" or "median" . I have tried overallline = F, overallline="n", and
2008 Sep 23
1
plot error
HI there, why these lines of code are correct plot(count~spray, data = InsectSprays) plot(InsectSprays$count) but this return an error: plot(count, data = InsectSprays); "data" method is not implemented in plot?! Thanx, Gianandrea -- View this message in context: http://www.nabble.com/plot-error-tp19624873p19624873.html Sent from the R help mailing list archive at Nabble.com.
2006 Apr 27
3
ordered boxplots
Dear List-Members, I would like to produce a ordered boxplot in which the categories with the smallest median are plotted at the left end and the box with the largest median at the right. Thanks in advance for any advices Thomas H.
2010 Aug 13
2
Dealing with data
# how would I code in R to look at the letter of the alphabet # in the second column and create a indicator column for the # corresponding letter? data(InsectSprays) InsectSprays$spray
2003 Apr 11
1
Pearson's Chi-squared Test
How i can perform a Pearson's Chi-squared Test in this data set: | Outcome -----------------+-----------+----------------------------------+ Treatment | Sex | None |Some | Marked | Total -----------------+------------+--------+--------+-------------+ Active | Female | 6 | 5 | 16 | 27
2004 Dec 24
6
Sorting problem
Hi I'm using R 2.0 in SuSE 9.2. When I plot data as a boxplot, the boxes appear on the plot in alphabetical order (of group) rather than the order in which they appear in the data. So far, the only thing I can do to fix this is to prefix the group labels with a,b,c...etc to trick R into plotting them in the right order. Can sorting be turned off? How should I address this sensibly? Thanks
2011 Dec 09
3
Como marcar la media en un grafico boxplot ??
Estimados amigos, mi pregunta es bien directa, a ver si alguien me puede ayudar: Como marcar la media en un grafico boxplot ?? Por lo que veo, los boxplot en R marcan por defecto la mediana dentro de la caja, pero necesito marcar la media y ojala sacar la mediana para que no aparezcan los dos parametros. Por lo que he leido, imagino que se puede hacer con alguna funcion de bajo nivel, pero soy
2012 Jul 22
5
Reorder in decreasing order
reorder() is probably the best way to order the levels in a vector without manually specifying the order. But reorder() orders by default in an increasing order: "The levels are ordered such that the values returned by ?FUN? are in increasing order." Is there a way to do what reorder() does, but order the levels according to a _decreasing_ order of the values? Sverre