Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Between subjects error term for two way repeated measures anova

    I am having some trouble running a two-way repeated measures anova.

    First, let me describe the nature of my data: I have 225 subjects who each completed 190 trials. In each trial, the subject is presented with a prime (1 of 3 possible primes), then given a target image to respond to (1 of 2 possible target images). I have recorded the response time (RT) for each trial. This is a within-subjects 3x2 design. That is, for each trial, I have two IVs (prime and target) and a DV (RT). To be clear, every subject is randomly assigned to a prime and a target on each trial, so each subject sees every possible combination of primes and targets several times. Trials on which subjects responded incorrectly or took too long to respond have been eliminated already, so I have an uneven number of trials remaining for each subject, but the average is about 175.

    Here are my variables:
    id- a numeric value used to identify each subject. I created this variable by encoding mturk identifiers that I was calling "subject" (i.e., encode subject, generate(id))
    primenum- a numeric value (1, 2,or 3) identifying which prime was shown on that trial
    targettypenum- a numeric value (1 or 2) identifying which target was shown on that trial
    latency- this is my DV; it is the reaction time on that trial

    After much trial and error, I used code that was suggested for a similar design on this forum. Here is the code I used and the corresponding output:

    anova latency primenum/ primenum|id targettypenum / targettypenum|id primenum#targettypenum / primenum#targettypenum|id primenum#targettypenum id, repeated(primenum targettypenum) bse(id)
    could not determine between-subject basic unit; use bseunit() option
    r(422);

    I subsequently tried replacing bse(id) with bseunit(id) and got the exact same output:

    . anova latency primenum/ primenum|id targettypenum / targettypenum|id primenum#targettypenum / primenum#targettypenum|id primenum#targettypenum id, repeated(primenum targettypenum) bseunit(id)
    could not determine between-subject basic unit; use bseunit() option
    r(422);

    I am using Stata/SE 12.0 for Windows (32-bit) on a Windows 7 Home Premium 64-bit operating system if that impacts your suggestions.

    Does anyone have any advice? Please let me know if additional information is needed.

  • #2
    If anyone on here considers him/herself an expert on this topic and does not know why such an error would persist, please let me know. If it seems hopeless I'll probably need to turn to another platform to analyze these data.

    Comment


    • #3
      take a look at the following FAQ: http://www.stata.com/support/faqs/st...easures-anova/

      then, if you are still having a problem, ask again but after reading the Forum FAQ please

      Comment


      • #4
        I haven't used repeated measures anova in a very long time, and don't really remember how to use the command anymore. If you're committed to that particular analysis, you might hold out a little longer for a response from somebody on this list who can help.

        If you're not committed to that analysis, you might consider using a mixed-effects model instead:

        Code:
        xtmixed latency i.primenum##i.targettypenum || id: // VERSION 12 CODE
        In fact, I believe, in a fully balanced data set which actually satisfied the sphericity assumptions of repeated measures anova, these analyses would give equivalent results.

        Comment


        • #5
          Originally posted by Rich Goldstein View Post
          take a look at the following FAQ: http://www.stata.com/support/faqs/st...easures-anova/

          then, if you are still having a problem, ask again but after reading the Forum FAQ please
          I had read both the linked FAQ and the forum FAQ in their entirety before posting the original post. If you feel that there is a problem with my original question that violates the forum guidelines, can you please specify what that is?

          Comment


          • #6
            Originally posted by Clyde Schechter View Post
            I haven't used repeated measures anova in a very long time, and don't really remember how to use the command anymore. If you're committed to that particular analysis, you might hold out a little longer for a response from somebody on this list who can help.

            If you're not committed to that analysis, you might consider using a mixed-effects model instead:

            Code:
            xtmixed latency i.primenum##i.targettypenum || id: // VERSION 12 CODE
            In fact, I believe, in a fully balanced data set which actually satisfied the sphericity assumptions of repeated measures anova, these analyses would give equivalent results.
            Thank you. If I'm not able to sort out the issue with the anova, I will look into the mixed-effects model. I appreciate the suggestion.

            Comment


            • #7
              please use CODE delimiters as they make it much easier to read the code and Stata's response

              did you try anything in the anova FAQ? if yes, what happened? if no, why not?

              Comment


              • #8
                Originally posted by Rich Goldstein View Post
                please use CODE delimiters as they make it much easier to read the code and Stata's response

                did you try anything in the anova FAQ? if yes, what happened? if no, why not?
                The anova FAQ does not have any specific examples to cover two-way anovas using only within subjects IVs; the two-way provided is a mixed-plot model. Therefore, I tried to apply the examples to the best of my ability. The FAQ's suggestion on how to deal with the bse() or bseunit() errors is to specify the model properly, which I believe I have done. There is not a specific recommendation of what to do if you have already specified the bse() or bseunit() and Stata still produces the same error.

                Further, I've searched the forum for a similar model, and came across this:
                http://www.statalist.org/forums/foru...bjects-factors

                I've checked my model against this example and it seems correct to me. However, I've described the data in case someone sees a problem with my model.

                Comment


                • #9
                  as is true for Clyde, I have not estimated a repeated measures anova in many years (the assumptions are too stringent and always violated in my experience); I would also use "mixed" (note that xtmixed has been renamed to mixed)

                  Comment


                  • #10
                    Originally posted by Rich Goldstein View Post
                    as is true for Clyde, I have not estimated a repeated measures anova in many years (the assumptions are too stringent and always violated in my experience); I would also use "mixed" (note that xtmixed has been renamed to mixed)
                    Thank you.

                    Comment


                    • #11
                      In #1, Rebecca says she is using Stata 12. The renaming of -xtmixed- to -mixed- is later than that, so she needs to code it as -xtmixed-.

                      Comment


                      • #12
                        right, apologies

                        Comment

                        Working...
                        X