Re: [R] How to test for the difference of means in population, please help
Dear Wu, Thank you indeed very much for your response. Is it possible that I use this method to compare the distribution of original population that this observations come from? Thank you ideed very much. On 3/28/12, alan wu [via R] ml-node+s789695n4511310...@n4.nabble.com wrote: try anova if they have same observe points. conditions-rep(c(1,2),each=1600) response-sample (1:20,1600*2, replace= TRUE) points-rep(rep(1:400, each=4),2) replicates-rep(1:4,800) obs-data.frame(response,conditions,points,replicates) fit - lm(response~conditions+points,data=obs) anova(fit) On Mar 27, 3:13Â am, ali_protocol mohammadianalimohammad...@gmail.com wrote: Dear all, Novice in statistics. I have 2 experimental conditions. Each condition has ~400 points as its response. Each condition is done in 4 repereats (so I have 2 x 400 x 4 points). I want to compare the means of two conditions and test whether they are same or not. Which test should I use? #populations c = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) b = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) #means of repeats c.mean= apply (c,2, mean) b.mean= apply (b,2,mean) #mean of experiment c.mean.all= mean (c) b.mean.all= mean (b) -- View this message in context:http://r.789695.n4.nabble.com/How-to-test-for-the-difference-of-means... Sent from the R help mailing list archive at Nabble.com. __ r-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@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. ___ If you reply to this email, your message will be added to the discussion below: http://r.789695.n4.nabble.com/How-to-test-for-the-difference-of-means-in-population-please-help-tp4508089p4511310.html To unsubscribe from How to test for the difference of means in population, please help, visit http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4508089code=bW9oYW1tYWRpYW5hbGltb2hhbW1hZGlhbkBnbWFpbC5jb218NDUwODA4OXwtMTkwNDgxNTk3NQ== -- View this message in context: http://r.789695.n4.nabble.com/How-to-test-for-the-difference-of-means-in-population-please-help-tp4508089p4516385.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] __ R-help@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.
[R] How to test for the difference of means in population, please help
Dear all, Novice in statistics. I have 2 experimental conditions. Each condition has ~400 points as its response. Each condition is done in 4 repereats (so I have 2 x 400 x 4 points). I want to compare the means of two conditions and test whether they are same or not. Which test should I use? #populations c = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) b = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) #means of repeats c.mean= apply (c,2, mean) b.mean= apply (b,2,mean) #mean of experiment c.mean.all= mean (c) b.mean.all= mean (b) -- View this message in context: http://r.789695.n4.nabble.com/How-to-test-for-the-difference-of-means-in-population-please-help-tp4508089p4508089.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] How to test for the difference of means in population, please help
You should use mixed effects modeling to analyze data of this sort. This is not a topic that has generally been covered by introductory classes, so you should consult with a professional statistician on your problem, or educate yourself well beyond the novice level (this takes more than just reading 1 book, a few classes would be good to get to this level, or intense study of several books). Since everything is balanced nicely, you could average over the 4 repeats and use a 2 sample t test (assuming the assumptions hold, your sample data would be fine) comparing the 2 sets of 400 means. This will test for a general difference in the overall means, but ignores other information and hypotheses that may be important (which is why the mixed effects model approach is much preferred). On Tue, Mar 27, 2012 at 1:13 AM, ali_protocol mohammadianalimohammad...@gmail.com wrote: Dear all, Novice in statistics. I have 2 experimental conditions. Each condition has ~400 points as its response. Each condition is done in 4 repereats (so I have 2 x 400 x 4 points). I want to compare the means of two conditions and test whether they are same or not. Which test should I use? #populations c = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) b = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) #means of repeats c.mean= apply (c,2, mean) b.mean= apply (b,2,mean) #mean of experiment c.mean.all= mean (c) b.mean.all= mean (b) -- View this message in context: http://r.789695.n4.nabble.com/How-to-test-for-the-difference-of-means-in-population-please-help-tp4508089p4508089.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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. -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com __ R-help@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.
Re: [R] How to test for the difference of means in population, please help
try anova if they have same observe points. conditions-rep(c(1,2),each=1600) response-sample (1:20,1600*2, replace= TRUE) points-rep(rep(1:400, each=4),2) replicates-rep(1:4,800) obs-data.frame(response,conditions,points,replicates) fit - lm(response~conditions+points,data=obs) anova(fit) On Mar 27, 3:13 am, ali_protocol mohammadianalimohammad...@gmail.com wrote: Dear all, Novice in statistics. I have 2 experimental conditions. Each condition has ~400 points as its response. Each condition is done in 4 repereats (so I have 2 x 400 x 4 points). I want to compare the means of two conditions and test whether they are same or not. Which test should I use? #populations c = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) b = matrix (sample (1:20,1600, replace= TRUE), 400 ,4) #means of repeats c.mean= apply (c,2, mean) b.mean= apply (b,2,mean) #mean of experiment c.mean.all= mean (c) b.mean.all= mean (b) -- View this message in context:http://r.789695.n4.nabble.com/How-to-test-for-the-difference-of-means... Sent from the R help mailing list archive at Nabble.com. __ r-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@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.