Hello! I have a fairly simple (I guess) question. Suppose I have a table like this: Score Group 1 <numeric> Ctrl 2 <numeric> Ctrl . ... ... 10 <numeric> Treat 11 <numeric> Treat .. ... ... 25 <numeric> Treat What is(are) the simplest command(s) in R to perform an ordinary t-test for significant difference between the control group and the treatment group? Thanks, Erik [[alternative HTML version deleted]]
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.
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 <numeric> Ctrl > 2 <numeric> Ctrl > . ... ... > 10 <numeric> Treat > 11 <numeric> Treat > .. ... ... > 25 <numeric> Treat > > What is(are) the simplest command(s) in R to perform an ordinary t-test for > significant difference between the control group and the treatment group? > > Thanks, > > Erik > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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.
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 <numeric> Ctrl > 2 <numeric> Ctrl > . ... ... > 10 <numeric> Treat > 11 <numeric> Treat > .. ... ... > 25 <numeric> Treat > > What is(are) the simplest command(s) in R to perform an ordinary t-test for > significant difference between the control group and the treatment group??t.test G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%