From: Henrik Parn <henrik.parn_at_bio.ntnu.no>

Date: Mon 07 Aug 2006 - 00:13:29 EST

test.data2

R-help@stat.math.ethz.ch 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. Received on Mon Aug 07 01:40:13 2006

Date: Mon 07 Aug 2006 - 00:13:29 EST

I have received some data arranged like this:

id <- letters[1:6] y1 <- replicate(6, rnorm(n=1, mean=1)) # y-value at time = 1 y2 <- replicate(6, rnorm(n=1, mean=2)) # y-value at time = 2test.data2 <- data.frame(id, y1, y2)

test.data2

...in order to perform a paired t-test?

t.test(y1, y2, paired=T)

If yes, which is the most convenient way to rearrange the data? Or is it possible to apply the paired t-test function to the original data set?

And a side question: In my examples, I suppose can I use set.seed to reproduce the 'rnorm-values' created in the 'original data' also in my the 'rearranged data'. Can someone give me a hint of how to apply the same 'seed' to all the rnorms?

Henrik

R-help@stat.math.ethz.ch 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. Received on Mon Aug 07 01:40:13 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Mon 07 Aug 2006 - 18:19:41 EST.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*