1
$\begingroup$

I have a data set that is repeated-measures ratings of four devices (two two-level variables) for 6 dimensions (ease, confidence, comfort, control, size and fit), with a two-level between-subjects variable. Like so:

ptcip / grp / fdback / dur / assem / accep / freq / t.vs.r / attrib / meas / d.rating
1    RA   binary    short       <NA>  <NA> <NA> rating       ease    9         2
1    RA   binary    short       <NA>  <NA> <NA> rating confidence    7         1
1    RA   binary    short       <NA>  <NA> <NA> rating    comfort    6         4
1    RA   binary    short       <NA>  <NA> <NA> rating    control    5         3
1    RA   binary    short       <NA>  <NA> <NA> rating       size    7        -1
1    RA   binary    short       <NA>  <NA> <NA> rating        fit    6         0
1    RA   binary      med       <NA>  <NA> <NA> rating       ease    9         6
1    RA   binary      med       <NA>  <NA> <NA> rating confidence    5         6
1    RA   binary      med       <NA>  <NA> <NA> rating    comfort    6         5
1    RA   binary      med       <NA>  <NA> <NA> rating    control    9        -1
1    RA   binary      med       <NA>  <NA> <NA> rating       size    2        -1
1    RA   binary      med       <NA>  <NA> <NA> rating        fit    8        -2

I need to run separate ANOVAs on each of the dimensions (we know from other analyses that the dimensions are rated differently, so including it as a factor wouldn't be very informative). What's the most efficient way to write this--split each of the dimensions off into separate data frames, or specify aov to be run on data iff attrib == "ease"? Seems like the latter would be better, but I'm new to R.

The model I am currently specifying is

aov(d.ratings ~ grp*fdback*dur + Error(particip/(fdback*dur))+grp, PDdonly)

but as that collapses over the six dimensions, it's not actually meaningful atm.

$\endgroup$
2
$\begingroup$

You can indeed subset the data frame doing something like

aov(d.ratings ~ grp*fdback*dur + Error(particip/(fdback*dur))+grp,
    PDdonly[attrib == "ease",])

Typically however, different ratings would simply be regarded as separate variables, with the data frame formated accordingly. You could then specify your model with something like

aov(ease ~ blablabla)
$\endgroup$
  • $\begingroup$ Oh, MAN. R-style data structure is totally new to me (I'm used to SPSS) and I didn't even think of that. Thanks! $\endgroup$ – Krysta May 1 '13 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.