Re: [R] t.test with Welch correction is ambiguous

2023-11-27 Thread Ebert,Timothy Aaron
Subject: [R] t.test with Welch correction is ambiguous [External Email] Dear R Team! There was an ongoing debate on Research Gate about the "Welch" option in your base R t.test command. A user noticed that the correction of the degrees of freedom labeled as "Welch Two Sample

[R] t.test with Welch correction is ambiguous

2023-11-27 Thread Dr . Rainer Düsing
Dear R Team! There was an ongoing debate on Research Gate about the “Welch” option in your base R t.test command. A user noticed that the correction of the degrees of freedom labeled as “Welch Two Sample t-test”, if you choose var.equal = TRUE in the R t.test command, differs from the output of

[R] t.test of matching columns from two datasets using plyr

2014-08-12 Thread Felipe Carrillo
Hi, I Have two datasets df1 and df2 with 3 matching columns. I need to do a t.test of sp1, sp2 and sp3� and var1, var2 and var3 where the year, month and location match. I can do it with sapply or mapply but I want the end result to be a data.frame. I prefer to do it with plyr or dplyr as I have

Re: [R] t.test error

2013-08-08 Thread David Winsemius
On Aug 8, 2013, at 6:09 PM, iza.ch1 wrote: > Hi > > I receive a very strange error message after trying to do t-test. When I > write the code t.test(x) I get an error message: error in t.test(x) : > function "sqr" not found > > I don't understand this problem. Can someone help me how to do i

[R] t.test error

2013-08-08 Thread iza.ch1
Hi I receive a very strange error message after trying to do t-test. When I write the code t.test(x) I get an error message: error in t.test(x) : function "sqr" not found I don't understand this problem. Can someone help me how to do it right? Thanks a lot :)

Re: [R] t.test in for loop

2010-07-22 Thread Peter Ehlers
On 2010-07-22 11:28, Arne Schulz wrote: Dear list, I'd like to do several t-test within a for loop. Example follows: data1<- rnorm(1:25) data2<- rnorm(1:25) vars<- c("data1", "data2") for (i in vars) { t.test(i) } Unfortunately, it does not work because of the quotes in the vars

Re: [R] t.test in for loop

2010-07-22 Thread Henrique Dallazuanna
Try this: apply(Vectorize(get)(ls(patt = 'data')), 2, t.test) On Thu, Jul 22, 2010 at 2:28 PM, Arne Schulz < arne.sch...@student.uni-kassel.de> wrote: > Dear list, > I'd like to do several t-test within a for loop. Example follows: > > data1 <- rnorm(1:25) > data2 <- rnorm(1:25) > vars <- c("da

Re: [R] t.test in for loop

2010-07-22 Thread David Winsemius
On Jul 22, 2010, at 1:28 PM, Arne Schulz wrote: Dear list, I'd like to do several t-test within a for loop. Example follows: data1 <- rnorm(1:25) data2 <- rnorm(1:25) vars <- c("data1", "data2") for (i in vars) { t.test(i) } Unfortunately, it does not work because of the quote

[R] t.test in for loop

2010-07-22 Thread Arne Schulz
Dear list, I'd like to do several t-test within a for loop. Example follows: data1 <- rnorm(1:25) data2 <- rnorm(1:25) vars <- c("data1", "data2") for (i in vars) { t.test(i) } Unfortunately, it does not work because of the quotes in the vars-vector (running t.test(data1) by hand

Re: [R] t.test per line

2010-05-05 Thread David Winsemius
On May 5, 2010, at 12:15 PM, Mohamed Lajnef wrote: Dear All, I apologize for this trivial question, I can not find the solution I try to use t.test function per line in the data.frame, But i dont'understand the error message my program is as follows group1<-gl(2,20) fun<-function(x){ m

Re: [R] t.test per line

2010-05-05 Thread Erik Iverson
Mohamed Lajnef wrote: Dear All, I apologize for this trivial question, I can not find the solution I try to use t.test function per line in the data.frame, But i dont'understand the error message my program is as follows group1<-gl(2,20) fun<-function(x){ m<-data.frame(group1,x) #anova(

[R] t.test per line

2010-05-05 Thread Mohamed Lajnef
Dear All, I apologize for this trivial question, I can not find the solution I try to use t.test function per line in the data.frame, But i dont'understand the error message my program is as follows group1<-gl(2,20) fun<-function(x){ m<-data.frame(group1,x) #anova(aov(x ~ group1, m)) t.est

Re: [R] t.test data in one column

2010-04-01 Thread Phil Spector
Marlin - Consider the following: df = data.frame(x=rep(1:4,2),y=rep(c('M','F'),c(2,2))) t.test(x~y,data=df) Welch Two Sample t-test data: x by y t = 4.899, df = 6, p-value = 0.002714 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interva

Re: [R] t.test data in one column

2010-04-01 Thread Erik Iverson
Hello, Marlin Keith Cox wrote: I need a two sample t.test between M and F. The data are arranged in one column, x. Cant seem to figure how to run a two sample t.test. Not really sure what this output is giving me, but there should be no difference between M and F in the example, but summary p

[R] t.test data in one column

2010-04-01 Thread Marlin Keith Cox
I need a two sample t.test between M and F. The data are arranged in one column, x. Cant seem to figure how to run a two sample t.test. Not really sure what this output is giving me, but there should be no difference between M and F in the example, but summary p-value indicates this. How can I

Re: [R] t.test

2010-02-05 Thread Peter Dalgaard
Erik Iverson wrote: See the identical example in ?t.test I.e., t.test(Score~Group, data=mydata) parallel to the sleep data example. Actually, that example is unfortunate, because the sleep data are really paired, not independent groups. -- O__ Peter Dalgaard Øster Fa

Re: [R] t.test

2010-02-05 Thread Dennis Murphy
That typically assumes equal population variances, and not everybody wants that in a two-sample test. t.test() provides more options with less work. Dennis On Fri, Feb 5, 2010 at 9:38 AM, Jacobs wrote: > > I would use aov( ) > > mod<-aov(Score~Group, data=x) > summary(mod) > > JJ > -- > View th

Re: [R] t.test

2010-02-05 Thread Jacobs
I would use aov( ) mod<-aov(Score~Group, data=x) summary(mod) JJ -- View this message in context: http://n4.nabble.com/t-test-tp1470539p1470558.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https:/

Re: [R] t.test

2010-02-05 Thread Gavin Simpson
On Fri, 2010-02-05 at 17:44 +0100, ErikRH wrote: > Hello! I have a fairly simple (I guess) question. Suppose I have a table > like this: > > Score Group > 1 Ctrl > 2 Ctrl > ....... > 10Treat > 11Treat > .. ... ... > 25Treat > > What is(are) t

Re: [R] t.test

2010-02-05 Thread Erik Iverson
See the identical example in ?t.test ErikRH wrote: Hello! I have a fairly simple (I guess) question. Suppose I have a table like this: Score Group 1 Ctrl 2 Ctrl ....... 10Treat 11Treat .. ... ... 25Treat What is(are) the simplest command(

[R] t.test

2010-02-05 Thread ErikRH
Hello! I have a fairly simple (I guess) question. Suppose I have a table like this: Score Group 1 Ctrl 2 Ctrl ....... 10Treat 11Treat .. ... ... 25Treat What is(are) the simplest command(s) in R to perform an ordinary t-test for significant d

Re: [R] T.test error help

2009-07-09 Thread Uwe Ligges
ricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Amit Patel Gesendet: Thursday, July 09, 2009 9:20 AM An: r-help@r-project.org Betreff: [R] T.test error help Hi I am implementing the t

Re: [R] T.test error help

2009-07-09 Thread Daniel Malter
...@r-project.org] Im Auftrag von Amit Patel Gesendet: Thursday, July 09, 2009 9:20 AM An: r-help@r-project.org Betreff: [R] T.test error help Hi I am implementing the t.test in a loop and where the data is the same i get an error message. Error in t.test.default(Samp3, Samp1, na.rm = TRUE

Re: [R] T.test error help

2009-07-09 Thread Steve Lianoglou
Hi, On Jul 9, 2009, at 9:19 AM, Amit Patel wrote: Hi I am implementing the t.test in a loop and where the data is the same i get an error message. Error in t.test.default(Samp3, Samp1, na.rm = TRUE, var.equal = FALSE, : data are essentially constant The script i am using is for (i i

[R] T.test error help

2009-07-09 Thread Amit Patel
Hi I am implementing the t.test in a loop and where the data is the same i get an error message. Error in t.test.default(Samp3, Samp1, na.rm = TRUE, var.equal = FALSE, : data are essentially constant The script i am using is for (i in 1:length(zz[,1])) { Samp1 <- zz[i,2:17] Samp2 <- zz[

Re: [R] t.test or wilcox.test?

2009-06-15 Thread stephen sefick
Try both of them and see if they jive. On Mon, Jun 15, 2009 at 6:03 PM, Serebrenik, A. wrote: > Dear all, > > I have two samples that I need to compare. Running Shapiro Wilk normality > test does not allow me to reject the normality assumption neither for the > first sample (p-value = 0.8938) no

[R] t.test or wilcox.test?

2009-06-15 Thread Serebrenik, A.
Dear all, I have two samples that I need to compare. Running Shapiro Wilk normality test does not allow me to reject the normality assumption neither for the first sample (p-value = 0.8938) not for the second one (p-value = 0.07905). So the t.test seems to be applicable. However, the p-value fo

Re: [R] t.test in a loop

2009-01-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 28.01.2009 12:57:55: > On Wed, 28 Jan 2009, Michael Pearmain wrote: > > > Hi All, > > I've been having a little trouble with creating a loop that will run a a > > series of t.tests for inspection, > > Below is the code i've tried, and some checks i've

Re: [R] t.test in a loop

2009-01-28 Thread Thomas Lumley
On Wed, 28 Jan 2009, Michael Pearmain wrote: Hi All, I've been having a little trouble with creating a loop that will run a a series of t.tests for inspection, Below is the code i've tried, and some checks i've looked at. I've used the get(paste()) idea as i was told previously that the use of

[R] t.test in a loop

2009-01-28 Thread Michael Pearmain
Hi All, I've been having a little trouble with creating a loop that will run a a series of t.tests for inspection, Below is the code i've tried, and some checks i've looked at. I've used the get(paste()) idea as i was told previously that the use of the eval should try and be avoided. I've run a

Re: [R] t.test() on a list

2008-10-07 Thread Gang Chen
EMAIL PROTECTED]> > wrote: >> > I am sure you will get helpful answers. I am almost as sure that you >> > shouldn't be doing this. I suggest you consult with your local > statistician. >> > >> > -- Bert Gunter >> > >> > -O

Re: [R] t.test() on a list

2008-10-06 Thread Petr PIKAL
est you consult with your local statistician. > > > > -- Bert Gunter > > > > -Original Message- > > From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] On > > Behalf Of Gang Chen > > Sent: Thursday, October 02, 2008 11:24 AM > > To: [EMAIL PROTE

Re: [R] t.test() on a list

2008-10-02 Thread Gang Chen
shouldn't be doing this. I suggest you consult with your local statistician. > > -- Bert Gunter > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Gang Chen > Sent: Thursday, October 02, 2008 11:24 AM > To: [EMAIL PROTECTED] >

Re: [R] t.test() on a list

2008-10-02 Thread Bert Gunter
2008 11:24 AM To: [EMAIL PROTECTED] Subject: [R] t.test() on a list I have a list, myList, with each of its 9 components being a 15X15 matrix. I want to run a t-test across the list for each component in the matrix. For example, the first t-test is on myList[[1]][1, 1], myList[[2]][1, 1], ..., myLi

[R] t.test() on a list

2008-10-02 Thread Gang Chen
I have a list, myList, with each of its 9 components being a 15X15 matrix. I want to run a t-test across the list for each component in the matrix. For example, the first t-test is on myList[[1]][1, 1], myList[[2]][1, 1], ..., myList[[9]][1, 1]; and there are totally 15X15 t-tests. How can I run th

Re: [R] t.test & p-Value

2008-03-05 Thread Jorge Iván Vélez
Hi Eleni, Check *"Computing Thousands of Test Statistics Simultaneously in R" *in http://stat-computing.org/newsletter/v181.pdf Other alternative could be the multtest package. HTH Jorge On Wed, Mar 5, 2008 at 8:55 AM, Eleni Christodoulou <[EMAIL PROTECTED]> wrote: > On Wed, Mar 5, 2008 a

Re: [R] t.test & p-Value

2008-03-05 Thread Eleni Christodoulou
On Wed, Mar 5, 2008 at 2:05 PM, ian white <[EMAIL PROTECTED]> wrote: > Don't you need to make some allowance for multiple testing? E.g. to get > a experiment-wise significance level of 0.01 you need > > which(p.values < very small number) > > where the very small number is approximately 0.01/(tota

Re: [R] t.test & p-Value

2008-03-05 Thread Eleni Christodoulou
I am sorry, the test is unpaired...But my question remains Thanks, Eleni On Wed, Mar 5, 2008 at 2:33 PM, Eleni Christodoulou <[EMAIL PROTECTED]> wrote: > Hello list, > > I am trying to apply the paired t.test between diseased and not diseased > patients to identify genes that are more expressed

[R] t.test & p-Value

2008-03-05 Thread Eleni Christodoulou
Hello list, I am trying to apply the paired t.test between diseased and not diseased patients to identify genes that are more expressed in the one situation under the other. In order to retrieve the genes that are more expressed in the positive disease state I do: p.values<-c() for(i in 1:length(S

Re: [R] t.test : extracting Error

2007-11-21 Thread Uwe Ligges
mogra wrote: > Hi Thanks for the reply. > > I implemented your solution to my problem but ... > > For some of my column there is not enough data to do t-test so it gives me > error and stops the for loop, is any graceful way to check for error msg and > say ok if there is no $p.value continue t

[R] t.test : extracting Error

2007-11-21 Thread mogra
Hi Thanks for the reply. I implemented your solution to my problem but ... For some of my column there is not enough data to do t-test so it gives me error and stops the for loop, is any graceful way to check for error msg and say ok if there is no $p.value continue to the next column Once agai

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 15:54 schrieb Petr PIKAL: >> Petr PIKAL wrote: >>> Hi >>> >>> [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: >>> >>> Birgit Lemcke wrote: > Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > > >> S Ellison wrote: >> >> Peter Dalgaard <[EMAIL

Re: [R] t.test() with missing values

2007-09-14 Thread Petr PIKAL
> Petr PIKAL wrote: > > Hi > > > > [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > > > > > >> Birgit Lemcke wrote: > >> > >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > >>> > >>> > S Ellison wrote: > > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> > >>

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 14:27 schrieb Peter Dalgaard: > Petr PIKAL wrote: >> Hi >> >> [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: >> >> >>> Birgit Lemcke wrote: >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > S Ellison wrote: > > Peter Dalgaard <[EMAIL PROTECTED

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 14:12 schrieb Petr PIKAL: > Hi > > [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > >> Birgit Lemcke wrote: >>> >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: >>> S Ellison wrote: > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >>>

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
Petr PIKAL wrote: > Hi > > [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > > >> Birgit Lemcke wrote: >> >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: >>> >>> S Ellison wrote: Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>>

Re: [R] t.test() with missing values

2007-09-14 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > Birgit Lemcke wrote: > > > > Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > > > >> S Ellison wrote: > >>> > >> Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> > >> > >>> > >> Yes, but > >> > >> I don't think lme(

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
Birgit Lemcke wrote: > > Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > >> S Ellison wrote: >>> >> Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >> > So what can I do now to solve my problem? > > Do you think I should not use paired=TRUE? > You *can* only

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > S Ellison wrote: >> > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> > So what can I do now to solve my problem? Do you think I should not use paired=TRUE? >>> You *can* only use it when you have pairs, and y

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
S Ellison wrote: > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >>> So what can I do now to solve my problem? >>> >>> Do you think I should not use paired=TRUE? >>> >> You *can* only use it when you have pairs, and you must do it then, to >> correct for in

Re: [R] t.test() with missing values

2007-09-14 Thread S Ellison
>>> Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >> So what can I do now to solve my problem? >> >> Do you think I should not use paired=TRUE? >You *can* only use it when you have pairs, and you must do it then, to >correct for intra-pair correlation. The drawback is that it looks o

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 10:26 schrieb Peter Dalgaard: > Birgit Lemcke wrote: >> Thanks for your answer. >> >> First I will show you both vectors: >> [...] >> >> I tried this (complete.cases(Fem66, Mal66)) and you are right, it >> gives me back: >> >> (complete.cases(Fem66, Mal66)) >> [1] FALSE FALSE

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
Birgit Lemcke wrote: > Thanks for your answer. > > First I will show you both vectors: > [...] > > I tried this (complete.cases(Fem66, Mal66)) and you are right, it > gives me back: > > (complete.cases(Fem66, Mal66)) > [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE > FALSE FALS

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Thanks for your answer. First I will show you both vectors: Mal66 [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [28] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA

Re: [R] t.test() with missing values

2007-09-13 Thread Peter Dalgaard
Birgit Lemcke wrote: > Hello! > > I am using R 2.5.1 on a Apple Power Book G4 with Mac OS X 10.4.10 and > I am still R beginner. > > I try to calculate a t.test() using this code: > > TTest75<-t.test(Fem75, Mal75, alternative= "two.sided", paired= TRUE) > > This works properly, but I have t

[R] t.test() with missing values

2007-09-13 Thread Birgit Lemcke
Hello! I am using R 2.5.1 on a Apple Power Book G4 with Mac OS X 10.4.10 and I am still R beginner. I try to calculate a t.test() using this code: TTest75<-t.test(Fem75, Mal75, alternative= "two.sided", paired= TRUE) This works properly, but I have two variables with a lot of missing