Repeated Measures Anova (RMANOVA)?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Repeated Measures Anova (RMANOVA)?

Stuart Cathcart
Hi, wondering if RMANOVA is appropriate for the following: we have 2
groups (headache and control subjects) in which we measured pain
sensitivity before and after a stress task. it would seem to be a simple
mixed design (one BS factor with 2 levels, and one WS factor with 2
levels). However, our hypothesis is that stress will increase pain
sensitivity in both groups, but more so in headache group. Not
surprisingly, when we run the RMANOVA, we get a group effect (headache
group has incresed pain sensitivity) and a time effect (stres increases
pain sensitivity), but no interaction. This would sem to not support the
hypothesis. However, t-tests show no change in pre-post pain scores for
the control group, but a decrease in pre-post pain scores for the headache
group. Hence, it seems that the hypothesized effect is there, but that the
RMANOVA doesn't really show it due to the large change in headache group
scores and the small (but in the same direction) change in control group
scores. So, im wondering if the RMANOVA is the best analysis for this
data? or, is it simply the case that the RMANOVA IS the best analysis and
the effets just aren't there?
Reply | Threaded
Open this post in threaded view
|

Re: Repeated Measures Anova (RMANOVA)?

statisticsdoc
Stephen Brand
www.statisticsdoc.com

Stuart,

I would suggest that the Repated Measures ANOVA is the appropriate test of your hypothesis.  The Repeated Measures ANOVA is testing whether there is a significant difference in the slopes over time between the control and headache groups, which is the question of interest.  The t-test addresses a different point, namely whether the slope is significantly different from zero in the control and the headache group.  It is quite possible to find no significant difference between slopes even when one is significantly different from zero and the other is not.   A little more formally:

The null hypothesis that you are testing is whether:

Slope (Headache) - Slope (Control) =  0 .

The t-tests are dealing with the following null hypotheses:

Slope (Headache) = 0 .

Slope (Control) = 0 .

HTH,

SB


---- Stuart Cathcart <[hidden email]> wrote:

> Hi, wondering if RMANOVA is appropriate for the following: we have 2
> groups (headache and control subjects) in which we measured pain
> sensitivity before and after a stress task. it would seem to be a simple
> mixed design (one BS factor with 2 levels, and one WS factor with 2
> levels). However, our hypothesis is that stress will increase pain
> sensitivity in both groups, but more so in headache group. Not
> surprisingly, when we run the RMANOVA, we get a group effect (headache
> group has incresed pain sensitivity) and a time effect (stres increases
> pain sensitivity), but no interaction. This would sem to not support the
> hypothesis. However, t-tests show no change in pre-post pain scores for
> the control group, but a decrease in pre-post pain scores for the headache
> group. Hence, it seems that the hypothesized effect is there, but that the
> RMANOVA doesn't really show it due to the large change in headache group
> scores and the small (but in the same direction) change in control group
> scores. So, im wondering if the RMANOVA is the best analysis for this
> data? or, is it simply the case that the RMANOVA IS the best analysis and
> the effets just aren't there?

--
For personalized and experienced consulting in statistics and research design, visit www.statisticsdoc.com
Reply | Threaded
Open this post in threaded view
|

restructuring data ser

Zdaniuk, Bozena
Hello, I am trying to automate a data restructuring task and was
wondering if someone could help.
My data are:
Id      s01     s01a    s01b    s02     s02a    s02b    s03     s03a
s03b
1       1       5       16      0       .       .       1       4
24

S01, s02, s03 are events that may have happened to the subject.
So each subject can have zero, only one, only two, or all three events
recorded. Every time an event is recorded (has value of 1), the
additional info about this event (s0?a, s0?b variables) are also
recorded.
Now, I need to create only one event (and the a,b variables associated
with that event) per row. So, the data above should look like this:
Id      s01     s01a    s01b    s02     s02a    s02b    s03     s03a
s03b
1       1       5       16      0       .       .       .       .
.
Id      s01     s01a    s01b    s02     s02a    s02b    s03     s03a
s03b
1       .       .       .       0       .       .       1       4
24

Is there a way to do it through syntax? I tried playing around with the
Restructure Wizard but it did not seem to have such capability.
Any help would be greatly appreciated. Thanks a lot.
Bozena

Bozena Zdaniuk, Ph.D.

University of Pittsburgh

UCSUR, 6th Fl.

121 University Place

Pittsburgh, PA 15260

Ph.: 412-624-5736

Fax: 412-624-4810

email: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: restructuring data ser

Maguin, Eugene
Bozena,

To summarize you want to build a new dataset having as many records as the
count of 1's in the variables S01, S02 and S03. If the first record in the
set of records for the same id has S01=1, then S02-S02b and S03-S03b=sysmis
if S02=1 or S03=1, respectively. However, if S02=0 or S03=0, S02 or S03,
respectively, is not set to sysmis. For the second record in the set, S02 is
the target variable and for the third record in the set, S03 is the target
variable.


To start, I would add the data file three times to get three copies of every
record. Then sort by id.
Next, number the records with id. Like this,

Compute rec=1.
If (id eq lag(id)) rec=lag(rec)+1.

Now, work through each record resetting values to sysmis according to the
procedural rules.

Do if (rec eq 1).
+  Do if (s01 eq 1).
+     if (s02 eq 1) s02a=$sysmis.
+     if (s02 eq 1) s02b=$sysmis.
+     if (s02 eq 1) s02=$sysmis.
+     if (s03 eq 1) s03a=$sysmis.
+     if (s03 eq 1) s03b=$sysmis.
+     if (s03 eq 1) s03=$sysmis.
+  Else.
+     compute rec=9.
+  end if.
Else if (rec eq 2).
+  Do if (s02 eq 1).
+     if (s01 eq 1) s01a=$sysmis.
+     if (s01 eq 1) s01b=$sysmis.
+     if (s01 eq 1) s01=$sysmis.
+     if (s03 eq 1) s03a=$sysmis.
+     if (s03 eq 1) s03b=$sysmis.
+     if (s03 eq 1) s03=$sysmis.
+  Else.
+     compute rec=9.
+  end if.
Else if (rec eq 3).
+  Do if (s03 eq 1).
+     if (s01 eq 1) s01a=$sysmis.
+     if (s01 eq 1) s01b=$sysmis.
+     if (s01 eq 1) s01=$sysmis.
+     if (s02 eq 1) s02a=$sysmis.
+     if (s02 eq 1) s02b=$sysmis.
+     if (s02 eq 1) s02=$sysmis.
+  Else.
+     compute rec=9.
+  end if.
End if.

Lastly, dump the records with rec=9 as these are the records where s1=0,
s2=0 or s3=0, given that the rec=1, 2, or 3, respectively.

Select if (rec ne 9).

I haven't tested this so let me know if you have troubles.

Gene Maguin
Reply | Threaded
Open this post in threaded view
|

Re: restructuring data ser

Richard Ristow
In reply to this post by Zdaniuk, Bozena
At 11:19 AM 6/23/2006, Zdaniuk, Bozena wrote:

>I am trying to automate a data restructuring task.
>My data are:
>Id   s01   s01a  s01b  s02   s02a  s02b  s03   s03a   s03b
>1      1     5     16    0      .     .    1      4     24
>
>S01, s02, s03 are events that may have happened to the subject. So
>each subject can have zero, only one, only two, or all three events
>recorded. Every time an event is recorded (has value of 1), the
>additional info about this event (s0?a, s0?b variables) are also
>recorded.
>
>Now, I need to create only one event (and the a,b variables associated
>with that event) per row. So, the data above should look like this:
>
>Id   s01   s01a  s01b  s02   s02a  s02b  s03   s03a   s03b
>1      1      5    16    0      .     .    .      .      .
>1      .      .     .    0      .     .    1      4     24

The above is what you posted. Did you mean this?
Id   s01   s01a  s01b  s02   s02a  s02b  s03   s03a   s03b
1      1      5    16    .      .     .    .      .      .
1      .      .     .    0      .     .    .      .      .
1      .      .     .    .      .     .    1      4     24

You know your business best, but a more common way to restructure would
be,

Id   Event    s     s_a  s_b
1      1      1      5    16
1      2      0      .     .
1      3      1      4    24

That should be easier to use, for most purposes, and it can be done
with the restructuring wizard.

However, to do what you want - Gene Maguin suggested a solution
catenating the file with itself, sorting, and deleting unwanted values.
Here's an alternative, using XSAVE. This is SPSS draft output. I've
added two more test records.
* ....................................................... .
LIST.

List
|-------------------------|------------------------|
|Output Created           |24-JUN-2006 01:32:02    |
|-------------------------|------------------------|
Id s01 s01a s01b s02 s02a s02b s03 s03a s03b

  1   1   5   16    0   .    .    1   4   24
  2   1   7   13    1   3   15    0   .    .
  3   0   .    .    1   4   19    1   7   11


Number of cases read:  3    Number of cases listed:  3


* Rename the existing variables, to get out of the way of .
* new ones to be created.                                 .
ADD FILES
    /FILE=*
    /RENAME =
          (s01   s01a  s01b  s02   s02a  s02b  s03   s03a   s03b
          =x01   x01a  x01b  x02   x02a  x02b  x03   x03a   x03b).
.  /*-- LIST.

* Make new copies of the variables for the output file    .
NUMERIC   s01   s01a  s01b  s02   s02a  s02b  s03   s03a   s03b (F2).

VECTOR   s = s01 TO s03b.
VECTOR   x = x01 TO x03b.
LOOP    #EVENT = 1 TO 3.
*  Blank out all the output variables:                    .
.  RECODE  s01   s01a  s01b  s02   s02a  s02b  s03   s03a   s03b
           (ELSE = SYSMIS).
.  COMPUTE #LOWER = 1 + 3*(#EVENT-1).
.  COMPUTE #UPPER = #LOWER + 2.
.  LOOP  #INDEX = #LOWER TO #UPPER.
.     COMPUTE s(#INDEX) = x(#INDEX).
.  END LOOP.
.  XSAVE OUTFILE = EXPAND
      /KEEP = ID
          s01   s01a  s01b  s02   s02a  s02b  s03   s03a   s03b.
END LOOP.
EXECUTE  /* <- Yes, it's needed, here. */.

GET FILE=EXPAND.
LIST.

List
|-------------------------|------------------------|
|Output Created           |24-JUN-2006 01:32:02    |
|-------------------------|------------------------|
C:\Documents and Settings\Richard\My Documents
   \Temporary\SPSS
   \2006-06-23 Zdaniuk - restructuring data ser.SAV

Id s01 s01a s01b s02 s02a s02b s03 s03a s03b

  1   1   5   16    .   .    .    .   .    .
  1   .   .    .    0   .    .    .   .    .
  1   .   .    .    .   .    .    1   4   24
  2   1   7   13    .   .    .    .   .    .
  2   .   .    .    1   3   15    .   .    .
  2   .   .    .    .   .    .    0   .    .
  3   0   .    .    .   .    .    .   .    .
  3   .   .    .    1   4   19    .   .    .
  3   .   .    .    .   .    .    1   7   11

Number of cases read:  9    Number of cases listed:  9






Most people would find that easier to use



>Is there a way to do it through syntax? I tried playing around with
>the
>Restructure Wizard but it did not seem to have such capability.
>Any help would be greatly appreciated. Thanks a lot.
>Bozena
>
>Bozena Zdaniuk, Ph.D.
>
>University of Pittsburgh
>
>UCSUR, 6th Fl.
>
>121 University Place
>
>Pittsburgh, PA 15260
>
>Ph.: 412-624-5736
>
>Fax: 412-624-4810
>
>email: [hidden email]
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.1.394 / Virus Database: 268.9.0/368 - Release Date:
>6/16/2006