I have a data set as below "temperature" "gender" "hr" 96.3 1 70 96.7 1 71 96.9 1 74 96.4 2 69 96.7 2 62 96.8 2 75 Gender code (1) means males and Gender code (2) means females. I have to split the data by gender and then perform a* two-sample tes*t to see whether the population means are equivalent. When using a function to solve this I should use the *notation for stacked data*. I *cannot assume equal variances* How can I code them? I am just a beginner for R programming Thanks -- Joanna Thuc Quyen Nguyen [[alternative HTML version deleted]]
Sounds like a homework problem. If so, this list has a "no homework" policy and you should ask your professor or the TA for help. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Feb 24, 2016 at 10:35 AM, Joanna Nguyen <joanna.t.q.nguyen at gmail.com> wrote:> I have a data set as below > > "temperature" "gender" "hr" > 96.3 1 70 > 96.7 1 71 > 96.9 1 74 > 96.4 2 69 > 96.7 2 62 > 96.8 2 75 > > Gender code (1) means males and Gender code (2) means females. > I have to split the data by gender and then perform a* two-sample tes*t to > see whether the population means are equivalent. When using a function to > solve this I should use the *notation for stacked data*. I *cannot assume > equal variances* > How can I code them? I am just a beginner for R programming > Thanks > -- > Joanna Thuc Quyen Nguyen > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
Nordlund, Dan (DSHS/RDA)
2016-Feb-24 20:39 UTC
[R] how to split and use notation fro stacked data
I will suggest that you read the documentation on t.test. ?t.test Dan Daniel Nordlund, PhD Research and Data Analysis Division Services & Enterprise Support Administration Washington State Department of Social and Health Services> -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Joanna > Nguyen > Sent: Wednesday, February 24, 2016 10:36 AM > To: r-help at r-project.org > Subject: [R] how to split and use notation fro stacked data > > I have a data set as below > > "temperature" "gender" "hr" > 96.3 1 70 > 96.7 1 71 > 96.9 1 74 > 96.4 2 69 > 96.7 2 62 > 96.8 2 75 > > Gender code (1) means males and Gender code (2) means females. > I have to split the data by gender and then perform a* two-sample tes*t to > see whether the population means are equivalent. When using a function > to solve this I should use the *notation for stacked data*. I *cannot assume > equal variances* How can I code them? I am just a beginner for R > programming Thanks > -- > Joanna Thuc Quyen Nguyen > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.