[R] How should I organize data to compare differences in matchedpairs?

Thomas Levine thomas.levine at gmail.com
Sat Jan 26 08:14:58 CET 2008


I have everything in the data frame now. The calculations I need to
preform for each round are slightly different. How do I specify to make
one calculation for one round and one for the other? (One round is
called "C", and the other is "F")

Thomas Levine

On Thu, 2008-01-24 at 18:23 -0500, Thomas Levine wrote:

> By accident, I didn't send this to the list.
> 
> 
> 
> On Thu, 2008-01-24 at 17:54 -0500, Thomas Levine wrote:
> 
> > Oh, right, I don't need the differences. I only needed to get the
> > differences before because I was doing them sloppily in a
> > spreadsheet and needed to do a t-test manually because the program
> > didn't have a function for one type of t-test. I shall do it this
> > way then.
> > 
> > 
> > 
> > 
> > On Thu, 2008-01-24 at 12:05 -0700, Greg Snow wrote: 
> > 
> > > Here is how I would do it (there are multiple ways you could do it, so
> > > there is not single "Right" answer):
> > > 
> > > Assign each person a unique identifier.
> > > 
> > > Put all the information from the questionaire along with the idenifier
> > > and anything else that does not change between rounds (age, sex, height,
> > > ...) into one data frame.  This df will have as many rows as you have
> > > subjects.
> > > 
> > > The round information then goes into a second data frame with each round
> > > being a row (each subject has multiple rows) and include the unique
> > > identifier on each row for that person.
> > > 
> > > If you need information combined from both data frames, then use the
> > > merge function to merge the 2 data frames (or subsets of them) together.
> > > 
> > > Advantages of this method include:
> > > 
> > > Uses data frames which most of the analysis functions expect.
> > > Each piece of data is only entered once (other than the id)
> > > 
> > > Disadvantage:
> > > 
> > > Data is split between 2 objects.
> > > 
> > > 
> > > Hope this helps,
> > > 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20080126/0d440379/attachment.bin 


More information about the R-help mailing list