similar to: Subsetting problem

Displaying 20 results from an estimated 200 matches similar to: "Subsetting problem"

2007 Mar 09
2
Extracting the p of F statistics from lm
I need to extract the p value from a ANOVA done with lm model fitting <- lm(var ~ group) Sfitting <- summary(fitting) Sfitting[10][1] gives the F value and the degrees of freedom but I am not able to get the p value. The function df should give a p value given a F but I am not able to make it work. I found only something about aov in the R help and I am not able to make it work Massimo
2008 Jan 26
1
How to apply the wilcox_test function to subsets ?
Dear R-forumites, I want to apply a Wilcoxon test on subsets of the data frame mydata, splitted using the myindice variable. When I send : wilcoxtest <- by(mydata, mydata$myindice, function(x) {wilcox_test(x$value~x$fact)}) I get : Error in eval(expr, envir, enclos) : object "x" not found whereas wilcoxtest <- by(mydata, mydata$myindice, function(x)
2006 Oct 05
1
The W statistic in wilcox.exact
Does anyone know why wilcox.exact gives W-statistic 6 instead of 12 as indicated below. 12 is the rank sum of group 0 of x, which is the linear statistic computed by wilcox_test. y<-c(1,2,3,4,5) x<-c(1,1,0,0,0) (a) wilcox.exact wilcox.exact(y~x) Exact Wilcoxon rank sum test data: y by x W = 6, p-value = 0.2 alternative hypothesis: true mu is not equal to 0 (b) wilcox_test
2007 Apr 08
2
Plot symbols dimensions
I am writing some code to obtain publication-like plots (like the ones can be obtained with SigmaPlot). I am not able to find the dimensions of a point. Parameters like cex make you able to make it bigger or smaller but I need to know the exact dimension (in relative coordinates : if my plot is 640x480 a dot plotted with cex=1.5 will be...) Massimo Cressoni
2010 Aug 17
3
Weird differing results when using the Wilcoxon-test
Hi, I became a little bit confused when working with the Wilcoxon test in R. As far as I understood, there are mainly two versions: 1) wilcox.test{stats}, which is the default and an approximation, especially, when ties are involved 2) wilcox_test{coin}, which does calculate the distribution _exactly_ even, with ties. I have the following scenario: #---BeginCode--- # big example size = 60
2007 Mar 03
2
Sigmoidal fitting
I am trying to write a function that fits a sigmoid given a X and Y vector guessing the start parameters. I use nls. What I did (enclosed) seems to work well with many data points but if I want to fit small vectors like : pressure <- c(5,15,9,35,45) gas <- c(1000,2000,3000,4000,5000) it do not work. The help page says that it do no not work on zero residual data. Massimo Cressoni
2006 Nov 12
2
Compilation of R under UBUNTU Edgy
I am not able to compile R under ubuntu Edgy. ./configure error message is configure: error: --with-x=yes (default) and X11 headers/libs are not available I do not know which library is missing (I tried to install some X11 libs but were already on the system). Massimo Cressoni
2006 Sep 29
1
Confidence interval in the Wilcoxon exact test
Hi, Two functions wilcox.exact and wilcox_test give slightly different confidence intervals of the difference of the medians: for example y<-c(0,0,1.081,0.594,0,0.769,0,0.009,0,0,0.798,0.405,0.498,0.946,1.35,1.149,0.528) x<-c(rep(1,10),rep(2,7)) aa<-wilcox.exact(y~x,conf.int=TRUE) bb<-wilcox_test(y~factor(x),distribution="exact",conf.int=TRUE) aa bb Does anyone know
2005 Dec 20
1
Wilcoxon Mann-Whitney Rank Sum Test in R
An earlier post had posed the question: "Does anybody know what is relation between 'T' value calculated by 'wilcox_test' function (coin package) and more common 'W' value?" I found the question interesting and ran the commands in R and SPSS. The W reported by R did not seem to correspond to either Mann-Whitney U, Wilcoxon W or the Z which I have more
2006 Sep 29
1
Wilcoxon Rank test of Package Coin
Hi, I am running the following example which can be found on page 12 of the pdf file of COIN package wt<-wilcox_test(pd~age,data=water_transfer,distribution="exact", conf.int=TRUE) "wt" actually contains the estimate of difference in location and the confidence interval of it. I am just wondering how can I extract these values? From the examples, I understand that the
2013 May 30
1
wilcox_test function in coin package
Dear All, I have two simple data samples (no groups or factors, etc.) and would just like to compute the two-sample Wilcoxon Rank Sum test using the wilcox_test function contained in the coin package, which is reportedly better than the regular wilcox.test function because it performs some adjustment for ties. Would anyone know how to craft a script to perform this task? Much appreciated. Janh
2012 Jul 06
1
Mann-Whitney by group
Hello, I'm having some issues grouping cases for some Mann-Whitney U tests I'm attempting to run. I'm willing to use wilcox.test if it'll work; I've also tried wilcox_test() from the "coin" package. Here's the deal: for each column (A through H), I would like to run the two-sample independent test, comparing Group 5 (CD8.14 through CD8.17) to Group 6 (CD8.18
2005 Nov 14
1
effect sizes for Wilcoxon tests
Hello, I use t.test for normal distributed and wilcox.test for non-normal distributed samples. It is easy to write a function for t.test that calculates the effect size, because all parts of the formula are available from the t.test result: r = sqrt(t*t / (t*t + df)) However, for Wilcoxon tests, the formula for effect sizes is: r = Z / sqrt(N) I wonder how I can calculate the Z-score in R for
2013 Sep 15
1
b
LO HICE DE ESTA MANERA Y FUNCIONÓ a_HTA <- (estudiantes1[,c(1)]) IMC <- (estudiantes1[,c(2)]) estudiantes4 <- data.frame( IMC, a_HTA = factor(c(rep("si", 29), rep("no",30)))) wt <- wilcox_test(IMC ~ a_HTA, data = estudiantes4, distribution = "exact", conf.int = TRUE) print(wt) De: Jorge I Velez
2011 Jul 08
4
Using t tests
Dear Sir, I am doing some work on a population of patients. About half of them are admitted into hospital with albumin levels less than 33. The other half have albumin levels greater than 33, so I stratify them into 2 groups, x and y respectively. I suspect that the average length of stay in hospital for the group of patients (x) with albumin levels less than 33 is greater than those
2008 Jan 16
0
Exact wilcoxon may differ in R and SPSS/StatXact (due to round off in the latter pair)
Dear R-users, If you use the exact Wilcoxon test in the coin package, I would like make you aware of that SPSS/StatXact MAY perform a round-off before doing their exact Wilcoxon-Mann-Whitney test (if you ever are unlucky enough not to use R). I have data from two treatments and was surprised to find that SPSS (15 under Windows) and R differed in their p-values (0.167 resp. 0.172). It turns out
2011 Oct 06
1
Wilcox Test / Mann Whitney U Test
Hello List, I'm trying to prepare some lecture notes on non parametric methods, and I can't manually reproduce the results of the wilcox.test function for ordinal data. The data I'm using are from David Howell's website, available here http://www.uvm.edu/~dhowell/StatPages/More_Stuff/OrdinalChisq/OrdinalChiSq.html If I run the wilcox.test function on the data I get a p-value of
2010 Feb 24
1
extracting results from wilcox_test (package::coin)
Recently, I ran a series of Kruskal-Wallace tests [kruskal.test()] using by() to group by site Output is a list: >Herb.KW Herb.df$ID: 10-1 Kruskal-Wallis rank sum test data: Indicator_Rating by Year Kruskal-Wallis chi-squared = 15.24, df = 7, p-value = 0.03302 ----------------------------------------------------------------------------------------------------- Herb.df$ID: 18-1
2007 Apr 15
1
Expression for pedices
I know that this maybe a trivial question. I am not able to plot pedices in graph axes. Instead I am able to plot different math symbols : XLABEL <- expression(paste(cmH,lim(f(x), x %->% 0),"O PEEP")) works well XLABEL <- expression(paste(cmH,[2],"O PEEP")) is considered a wrong expression. Thanks
2005 Dec 02
1
sign and sign rank tests
R 2.1.1 on Windows 2K I hope one and all will allow both an R question and a general stats question: (1) Is there any function that will perform non-parametric tests such as a sign test or a signed rank test? I know I could program both but I would prefer not re-inventing the wheel. (2) When performing a sign test, the usual practice is to drop zero values. Is there any theoretical reason