Announcement

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

  • Getting the repeated-measures bse() error (again)

    Hello,

    I'm new to the list so apologies for posting a basic question. Until the latest update of STATA, I've been able to figure out how to do a repeated-measures analysis without getting this error:
    could not determine between-subject error term; use bse() option

    Now I'm getting it again and can't figure out how to change the syntax. I'm pretty sure I've read every post in this forum on the bseunit/bse error, as well the user manual, the help menus, and whatever I can find online, and am still stuck.

    It's an experiment where each person saw 4 types of stimuli (the category variable), and each type had a number of items. The dataset is too large to paste here, so below are the first two participants. There are different numbers of items in each category, but I didn't think that would matter.

    Our research question is whether there is an effect of category. We don't need effects of items, but I put them in the model.

    I initially thought it would be:

    anova score category item, repeated(category)

    but that generates the error. Ditto with adding a bse or bseunit.

    Thanks in advance for any advice!

    Participant Category Item Difference
    1 1 1 0
    1 1 2 1
    1 1 3 2
    1 1 4 2
    1 1 5 1
    1 1 6 2
    1 1 7 1
    1 2 1 0
    1 2 2 3
    1 2 3 2
    1 2 4 2
    1 2 5 1
    1 2 6 0
    1 2 7 0
    1 2 8 2
    1 2 9 2
    1 3 1 0
    1 3 2 2
    1 3 3 2
    1 3 4 2
    1 3 5 1
    1 3 6 1
    1 3 7 2
    1 3 8 2
    1 3 9 1
    1 3 10 2
    1 4 1 2
    1 4 2 2
    1 4 3 2
    1 4 4 1
    1 4 5 1
    1 4 6 1
    1 4 7 1
    1 4 8 2
    1 4 9 2
    1 4 10 2
    1 5 1 2
    1 5 2 1
    1 5 3 1
    1 5 4 1
    1 5 5 2
    1 5 6 2
    1 5 7 1
    1 5 8 1
    1 5 9 2
    1 5 10 2
    2 1 1 1
    2 1 2 3
    2 1 3 0
    2 1 4 2
    2 1 5 1
    2 1 6 1
    2 1 7 3
    2 2 1 3
    2 2 2 1
    2 2 3 0
    2 2 4 1
    2 2 5 0
    2 2 6 2
    2 2 7 1
    2 2 8 1
    2 2 9 1
    2 3 1 2
    2 3 2 2
    2 3 3 0
    2 3 4 2
    2 3 5 0
    2 3 6 2
    2 3 7 2
    2 3 8 3
    2 3 9 1
    2 3 10 1
    2 4 1 1
    2 4 2 1
    2 4 3 1
    2 4 4 2
    2 4 5 1
    2 4 6 1
    2 4 7 0
    2 4 8 1
    2 4 9 2
    2 4 10 1
    2 5 1 2
    2 5 2 2
    2 5 3 1
    2 5 4 1
    2 5 5 2
    2 5 6 2
    2 5 7 2
    2 5 8 1
    2 5 9 2
    2 5 10 1

  • #2
    You didn't include participant in your ANOVA model, and so there cannot be any repeated measurements. Try something like (is the outcome variable score or Difference?)
    Code:
    anova score participant category item category#item, repeated(category item)
    A couple of notes:

    1. With missing values, you have an unbalanced dataset; you'd probably be better off using -mixed- instead of -anova-.

    2. Is your score (or Difference) really {0, 1, 2, 3, .}?

    Comment


    • #3
      Thank you for the reply. I tried the code above as well and got the same error.

      1. Thanks for that. I'll have a look at mixed.
      2. Yes. Is that a problem?

      Comment


      • #4
        Originally posted by Lyn Turkstra View Post
        I tried the code above as well and got the same error.
        No you don't.

        .ÿ
        .ÿversionÿ17.0

        .ÿ
        .ÿclearÿ*

        .ÿ
        .ÿquietlyÿinputÿbyte(ParticipantÿCategoryÿItemÿDifference)

        .ÿ
        .ÿlistÿinÿ1/5,ÿnoobsÿabbreviate(20)

        ÿÿ+--------------------------------------------+
        ÿÿ|ÿParticipantÿÿÿCategoryÿÿÿItemÿÿÿDifferenceÿ|
        ÿÿ|--------------------------------------------|
        ÿÿ|ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿÿÿ0ÿ|
        ÿÿ|ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿ2ÿÿÿÿÿÿÿÿÿÿÿÿ1ÿ|
        ÿÿ|ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿ3ÿÿÿÿÿÿÿÿÿÿÿÿ2ÿ|
        ÿÿ|ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿ4ÿÿÿÿÿÿÿÿÿÿÿÿ2ÿ|
        ÿÿ|ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿ5ÿÿÿÿÿÿÿÿÿÿÿÿ1ÿ|
        ÿÿ+--------------------------------------------+

        .ÿ
        .ÿrenameÿ*,ÿlower

        .ÿrenameÿdifferenceÿscore

        .ÿ
        .ÿanovaÿscoreÿparticipantÿcategoryÿitemÿcategory#item,ÿrepeated(categoryÿitem)

        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿÿÿÿÿ92ÿÿÿÿR-squaredÿÿÿÿÿ=ÿÿ0.4323
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRootÿMSEÿÿÿÿÿÿ=ÿÿÿÿ.827662ÿÿÿÿAdjÿR-squaredÿ=ÿ-0.1479

        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿPartialÿSSÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿÿMSÿÿÿÿÿÿÿÿFÿÿÿÿProb>F
        ÿÿÿÿÿÿÿÿÿÿÿ--------------+----------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿModelÿ|ÿÿ23.478261ÿÿÿÿÿÿÿÿÿ46ÿÿÿ.51039698ÿÿÿÿÿÿ0.75ÿÿ0.8381
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
        ÿÿÿÿÿÿÿÿÿÿÿÿÿparticipantÿ|ÿÿ.17391304ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ.17391304ÿÿÿÿÿÿ0.25ÿÿ0.6168
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcategoryÿ|ÿÿ1.3050265ÿÿÿÿÿÿÿÿÿÿ4ÿÿÿ.32625661ÿÿÿÿÿÿ0.48ÿÿ0.7529
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿitemÿ|ÿÿÿ5.594709ÿÿÿÿÿÿÿÿÿÿ9ÿÿÿ.62163433ÿÿÿÿÿÿ0.91ÿÿ0.5271
        ÿÿÿÿÿÿÿÿÿÿÿcategory#itemÿ|ÿÿ16.444974ÿÿÿÿÿÿÿÿÿ32ÿÿÿ.51390542ÿÿÿÿÿÿ0.75ÿÿ0.8013
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿ30.826087ÿÿÿÿÿÿÿÿÿ45ÿÿÿ.68502415ÿÿ
        ÿÿÿÿÿÿÿÿÿÿÿ--------------+----------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTotalÿ|ÿÿ54.304348ÿÿÿÿÿÿÿÿÿ91ÿÿÿ.59675108ÿÿ


        Between-subjectsÿerrorÿterm:ÿÿparticipant
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLevels:ÿÿ2ÿÿÿÿÿÿÿÿÿ(1ÿdf)
        ÿÿÿÿÿLowestÿb.s.e.ÿvariable:ÿÿparticipant

        Repeatedÿvariable:ÿcategory
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHuynh-Feldtÿepsilonÿÿÿÿÿÿÿÿ=ÿÿÿÿ.
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿGreenhouse-Geisserÿepsilonÿ=ÿÿ0.2500
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBox'sÿconservativeÿepsilonÿ=ÿÿ0.2500

        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ------------ÿProbÿ>ÿFÿ------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿÿÿÿÿdfÿÿÿÿÿÿFÿÿÿÿRegularÿÿÿÿH-FÿÿÿÿÿÿG-GÿÿÿÿÿÿBox
        ÿÿÿÿÿÿÿÿÿÿÿ--------------+----------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcategoryÿ|ÿÿÿÿÿÿ4ÿÿÿÿÿ0.48ÿÿÿ0.7529ÿÿÿÿÿ.ÿÿÿÿÿÿ0.5041ÿÿÿ0.5041
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿÿÿÿ45
        ÿÿÿÿÿÿÿÿÿÿÿ-------------------------------------------------------------------

        Repeatedÿvariable:ÿitem
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHuynh-Feldtÿepsilonÿÿÿÿÿÿÿÿ=ÿÿÿÿ.
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿGreenhouse-Geisserÿepsilonÿ=ÿÿÿÿ.
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBox'sÿconservativeÿepsilonÿ=ÿÿ0.1111

        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ------------ÿProbÿ>ÿFÿ------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿÿÿÿÿdfÿÿÿÿÿÿFÿÿÿÿRegularÿÿÿÿH-FÿÿÿÿÿÿG-GÿÿÿÿÿÿBox
        ÿÿÿÿÿÿÿÿÿÿÿ--------------+----------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿitemÿ|ÿÿÿÿÿÿ9ÿÿÿÿÿ0.91ÿÿÿ0.5271ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.3845
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿÿÿÿ45
        ÿÿÿÿÿÿÿÿÿÿÿ-------------------------------------------------------------------

        Repeatedÿvariables:ÿcategory#item
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHuynh-Feldtÿepsilonÿÿÿÿÿÿÿÿ=ÿÿÿÿ.
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿGreenhouse-Geisserÿepsilonÿ=ÿÿÿÿ.
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBox'sÿconservativeÿepsilonÿ=ÿÿ0.0313

        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ------------ÿProbÿ>ÿFÿ------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿÿÿÿÿdfÿÿÿÿÿÿFÿÿÿÿRegularÿÿÿÿH-FÿÿÿÿÿÿG-GÿÿÿÿÿÿBox
        ÿÿÿÿÿÿÿÿÿÿÿ--------------+----------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿcategory#itemÿ|ÿÿÿÿÿ32ÿÿÿÿÿ0.75ÿÿÿ0.8013ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.5089
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿÿÿÿ45
        ÿÿÿÿÿÿÿÿÿÿÿ-------------------------------------------------------------------

        .ÿ
        .ÿexit

        endÿofÿdo-file


        .


        You'd better check your dataset again. The snippet you posted of it seems unrepresentative in more ways that just the outcome variable name.

        Comment


        • #5
          Oh my gosh! I overlooked that item was also repeated. Thank you!

          Comment


          • #6
            We have two other between-subjects variables: version and sex. If I add those I get the bse error again:

            . anova difference participant category item sex version category#item, repeated(category item)

            could not determine between-subject error term; use bse() option

            Comment


            • #7
              Originally posted by Lyn Turkstra View Post
              We have two other between-subjects variables: version and sex.
              Dataset, please.

              Comment


              • #8
                You say that both the two new variables are between-subjects. You can try
                Code:
                anova difference sex version / participant|sex#version category item category#item, repeated(category item)
                but details depend upon just how participants are nested under the two between-subjects variables, and I cannot tell that without seeing anything.

                Comment


                • #9
                  Thank you for that code. It turns out it's a bug with 15.1 on my OS, as my colleagues can run it on their PCs or on a Mac using STATA version 14 or 16 with no problem. I'll follow up with STATA on that. Thanks!

                  Comment

                  Working...
                  X