Re: [R] multiple paired t-tests without loops

2010-04-28 Thread Daniel Malter
Hi Matt, see the example below. It took me a while to figure it out. I suggest you carefully examine the example step by step. It computes t-values for dataset with 3 variables and 8 unique combinations of two binning variables. The code should extend easily to larger datasets. Also, it uses the e

Re: [R] multiple paired t-tests without loops

2010-04-28 Thread Greg Snow
help@r-project.org > Subject: Re: [R] multiple paired t-tests without loops > > Yes, I suspect that I will end up using a sampling approach, but I'd > like to use an exact test if it's at all feasible. > > Here are two samples of data from 3 subjects: > Sample

Re: [R] multiple paired t-tests without loops

2010-04-27 Thread Tal Galili
Hi Matthew, First - I fully support Greg Snow proposition. Sampling is the way to go here. But besides that: 1) Try to avoid using data.frames as much as possible (use vectors and matrixes instead - they are usually faster) 2) Since you are running on a loop, you can try running it in parallel (

Re: [R] multiple paired t-tests without loops

2010-04-26 Thread Matthew Finkbeiner
Yes, I suspect that I will end up using a sampling approach, but I'd like to use an exact test if it's at all feasible. Here are two samples of data from 3 subjects: Sample SubjC1 C2 44 1 0.0093 0.0077 44 2 0.0089 0.0069 44 3 0.051 0.0432 44 4

Re: [R] multiple paired t-tests without loops

2010-04-26 Thread Greg Snow
801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Matthew Finkbeiner > Sent: Saturday, April 24, 2010 4:58 AM > To: r-help@r-project.org > Subject: [R] multiple paired t-tests without loops >

[R] multiple paired t-tests without loops

2010-04-24 Thread Matthew Finkbeiner
I am new to R and I suspect my problem is easily solved, but I haven't been able to figure it out without using loops. I am trying to implement Blair & Karniski's (1993) permutation test. I've included a sample data frame below. This data frame represents the conditional means (C1, C2) for 3

[R] multiple paired t-tests without loops

2010-04-24 Thread Matthew Finkbeiner
I am new to R and I suspect my problem is easily solved, but I haven't been able to figure it out without using loops. I am trying to implement Blair & Karniski's (1993) permutation test. I've included a sample data frame below. This data frame represents the conditional means (C1, C2) for 3