Announcement

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

  • repeated-measure vs. nested anova problems

    I think I want to use Repeated-Measure Anova command, "anova, repeated ()" or "wsanova" commands based on the instruction from this site (https://www.stata.com/support/faqs/s...easures-anova/), but I am unsure if I can use this command with the type of data I have. I am using Stata/MP 14.0 for Mac.

    To describe the data, participants from two countries responded to items from three domains (i.e., A, B, and C). So the repeated component here is the domain. We created two conditions (high vs. low) nested within each domain so there were a total of six sub-domains (i.e., A high, A low, B high, B low, C high, and C low). Participants were randomized into either high or low condition within each domain. In other words, participants were not divided into a single condition, and their conditions differed depending on each domain. For instance, some participants answered questions in A-high subdomain, B-low subdomain, and C-high subdomain. I am attaching a portion of the dataset I have. ID is the participant number below.
    ID Country Domain Condition Total
    1 1 1 2 2
    1 1 2 2 2
    1 1 3 2 1.833333254
    2 1 1 1 2.416666746
    2 1 2 1 1.916666627
    2 1 3 1 3.416666746
    3 1 1 2 2.916666508
    3 1 2 1 2.833333254
    3 1 3 2 2.75
    4 2 1 2 1.5
    4 2 2 2 1.666666746
    4 2 3 2 1.166666627
    5 2 1 1 2.416666746
    5 2 2 2 2.75
    5 2 3 2 2.583333254
    6 2 1 1 2.333333492
    6 2 2 2 3.5
    6 2 3 1 2
    Could I use the following command to run Repeated-Measure Anova to examine the effect of two between-subject variables (country and condition) and one within-subject variable (domain)? The issue that I am currently having is that each participant could have been assigned to multiple conditions depending on the domain (e.g., participant 3, 5, or 6). If I can't use this command, could you give me some suggestions on what command/analysis I could use?

    anova Total Country Condition Country#Condition/ ID | Country#Condition Domain Domain#Country Domain#Condition Domain#Condition#Country, rep (Domain)

    **Another option I have been thinking of was using nested anova (two condition nested in each domain), but I am not sure if I could run interaction terms (interactions among Domain#Condition#Country) with nested anova. To sum, what I want to do essentially is to run anova with all three variables (Country, Domain, and Condition) included, and I am not sure what command to use.

    I have been spending every waking hour from the past two weeks trying to resolve this so any advice would be truly appreciated. Thank you in advance for any advice!

    So
    Last edited by So Kim; 30 Oct 2021, 19:53. Reason: nested

  • #2
    So:
    Joseph Coveney is an expert on this stuff (and many other topics): see his posts.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      This post might be a duplicate of this?

      I'm no expert, but I've tried to fathom how the OP's survey is constructed and it looks as if the participants are not nested under condition. Rather, their being randomized to condition for each domain within a fixed sequence of three domains seems to me to effectively nest participants within a condition pattern: a sequence of three high-or-low conditions. It's this condition sequence (pattern) to which participants are in effect randomized, and not condition alone. And so this pattern is what I would include with country in the list of between-participant factors.

      It's not clear what the OP's research question is, but maybe an ANOVA model something like that below might be a place to start? (Begin at the "Begin here" comment; the top section is just to create a toy dataset for illustration based upon what I infer of the survey dataset from the snippet of it that the OP shows. And to show what I mean by pattern of condition sequence.)

      .ÿ
      .ÿversionÿ17.0

      .ÿ
      .ÿclearÿ*

      .ÿ
      .ÿsetÿseedÿ`=strreverse("1633586")'

      .ÿ
      .ÿframeÿcreateÿIllustration

      .ÿcwfÿIllustration

      .ÿinputÿbyte(IDÿCountryÿDomainÿCondition)ÿdoubleÿTotal

      ÿÿÿÿÿÿÿÿÿÿÿIDÿÿÿCountryÿÿÿÿDomainÿÿCondit~nÿÿÿÿÿÿÿTotal
      ÿÿ1.ÿ1ÿ1ÿ1ÿ2ÿ2
      ÿÿ2.ÿ1ÿ1ÿ2ÿ2ÿ2
      ÿÿ3.ÿ1ÿ1ÿ3ÿ2ÿ1.833333254
      ÿÿ4.ÿ2ÿ1ÿ1ÿ1ÿ2.416666746
      ÿÿ5.ÿ2ÿ1ÿ2ÿ1ÿ1.916666627
      ÿÿ6.ÿ2ÿ1ÿ3ÿ1ÿ3.416666746
      ÿÿ7.ÿ3ÿ1ÿ1ÿ2ÿ2.916666508
      ÿÿ8.ÿ3ÿ1ÿ2ÿ1ÿ2.833333254
      ÿÿ9.ÿ3ÿ1ÿ3ÿ2ÿ2.75
      ÿ10.ÿ4ÿ2ÿ1ÿ2ÿ1.5
      ÿ11.ÿ4ÿ2ÿ2ÿ2ÿ1.666666746
      ÿ12.ÿ4ÿ2ÿ3ÿ2ÿ1.166666627
      ÿ13.ÿ5ÿ2ÿ1ÿ1ÿ2.416666746
      ÿ14.ÿ5ÿ2ÿ2ÿ2ÿ2.75
      ÿ15.ÿ5ÿ2ÿ3ÿ2ÿ2.583333254
      ÿ16.ÿ6ÿ2ÿ1ÿ1ÿ2.333333492
      ÿ17.ÿ6ÿ2ÿ2ÿ2ÿ3.5
      ÿ18.ÿ6ÿ2ÿ3ÿ1ÿ2
      ÿ19.ÿend

      .ÿ
      .ÿgenerateÿdoubleÿtotÿ=ÿTotalÿ*ÿ12

      .ÿtabulateÿtot

      ÿÿÿÿÿÿÿÿtotÿ|ÿÿÿÿÿÿFreq.ÿÿÿÿÿPercentÿÿÿÿÿÿÿÿCum.
      ------------+-----------------------------------
      ÿÿÿÿÿÿÿÿÿ14ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿÿ5.56
      ÿÿÿÿÿÿÿÿÿ18ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ11.11
      ÿÿÿÿÿÿÿÿÿ20ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ16.67
      ÿÿÿÿÿÿÿÿÿ22ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ22.22
      ÿÿÿÿÿÿÿÿÿ23ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ27.78
      ÿÿÿÿÿÿÿÿÿ24ÿ|ÿÿÿÿÿÿÿÿÿÿ3ÿÿÿÿÿÿÿ16.67ÿÿÿÿÿÿÿ44.44
      ÿÿÿÿÿÿÿÿÿ28ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ50.00
      ÿÿÿÿÿÿÿÿÿ29ÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿ11.11ÿÿÿÿÿÿÿ61.11
      ÿÿÿÿÿÿÿÿÿ31ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ66.67
      ÿÿÿÿÿÿÿÿÿ33ÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿ11.11ÿÿÿÿÿÿÿ77.78
      ÿÿÿÿÿÿÿÿÿ34ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ83.33
      ÿÿÿÿÿÿÿÿÿ35ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ88.89
      ÿÿÿÿÿÿÿÿÿ41ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿÿ94.44
      ÿÿÿÿÿÿÿÿÿ42ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ5.56ÿÿÿÿÿÿ100.00
      ------------+-----------------------------------
      ÿÿÿÿÿÿTotalÿ|ÿÿÿÿÿÿÿÿÿ18ÿÿÿÿÿÿ100.00

      .ÿquietlyÿsummarizeÿtot

      .ÿtempnameÿmeanÿsd

      .ÿscalarÿdefineÿ`mean'ÿ=ÿr(mean)

      .ÿscalarÿdefineÿ`sd'ÿ=ÿr(sd)

      .ÿ
      .ÿ//ÿPatternsÿ(2^3)ÿofÿHigh-LowÿConditions:ÿOnesies,ÿTwosiesÿandÿThreesies
      .ÿdropÿ_all

      .ÿinputÿstr5(pattern)

      ÿÿÿÿÿÿÿpattern
      ÿÿ1.ÿ"HÿLÿL"
      ÿÿ2.ÿ"LÿHÿL"
      ÿÿ3.ÿ"LÿLÿH"
      ÿÿ4.ÿ"HÿHÿL"
      ÿÿ5.ÿ"HÿLÿH"
      ÿÿ6.ÿ"LÿHÿH"
      ÿÿ7.ÿ"HÿHÿH"
      ÿÿ8.ÿ"LÿLÿL"
      ÿÿ9.ÿend

      .ÿ
      .ÿencodeÿpattern,ÿgenerate(pat)ÿlabel(Patterns)

      .ÿ
      .ÿ//ÿShowingÿ(-list-)ÿtheÿPatternsÿofÿDomain-ConditionÿCombinations
      .ÿframeÿcopyÿIllustrationÿPatterns

      .ÿcwfÿPatterns

      .ÿquietlyÿsplitÿpattern,ÿgenerate(condition)

      .ÿquietlyÿreshapeÿlongÿcondition,ÿi(pat)ÿj(dom)

      .ÿencodeÿcondition,ÿgenerate(con)ÿlabel(Conditions)

      .ÿlistÿpatÿdomÿcon,ÿnoobsÿseparator(3)

      ÿÿ+-------------------+
      ÿÿ|ÿÿÿpatÿÿÿdomÿÿÿconÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿHÿHÿHÿÿÿÿÿ1ÿÿÿÿÿHÿ|
      ÿÿ|ÿHÿHÿHÿÿÿÿÿ2ÿÿÿÿÿHÿ|
      ÿÿ|ÿHÿHÿHÿÿÿÿÿ3ÿÿÿÿÿHÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿHÿHÿLÿÿÿÿÿ1ÿÿÿÿÿHÿ|
      ÿÿ|ÿHÿHÿLÿÿÿÿÿ2ÿÿÿÿÿHÿ|
      ÿÿ|ÿHÿHÿLÿÿÿÿÿ3ÿÿÿÿÿLÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿHÿLÿHÿÿÿÿÿ1ÿÿÿÿÿHÿ|
      ÿÿ|ÿHÿLÿHÿÿÿÿÿ2ÿÿÿÿÿLÿ|
      ÿÿ|ÿHÿLÿHÿÿÿÿÿ3ÿÿÿÿÿHÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿHÿLÿLÿÿÿÿÿ1ÿÿÿÿÿHÿ|
      ÿÿ|ÿHÿLÿLÿÿÿÿÿ2ÿÿÿÿÿLÿ|
      ÿÿ|ÿHÿLÿLÿÿÿÿÿ3ÿÿÿÿÿLÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿLÿHÿHÿÿÿÿÿ1ÿÿÿÿÿLÿ|
      ÿÿ|ÿLÿHÿHÿÿÿÿÿ2ÿÿÿÿÿHÿ|
      ÿÿ|ÿLÿHÿHÿÿÿÿÿ3ÿÿÿÿÿHÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿLÿHÿLÿÿÿÿÿ1ÿÿÿÿÿLÿ|
      ÿÿ|ÿLÿHÿLÿÿÿÿÿ2ÿÿÿÿÿHÿ|
      ÿÿ|ÿLÿHÿLÿÿÿÿÿ3ÿÿÿÿÿLÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿLÿLÿHÿÿÿÿÿ1ÿÿÿÿÿLÿ|
      ÿÿ|ÿLÿLÿHÿÿÿÿÿ2ÿÿÿÿÿLÿ|
      ÿÿ|ÿLÿLÿHÿÿÿÿÿ3ÿÿÿÿÿHÿ|
      ÿÿ|-------------------|
      ÿÿ|ÿLÿLÿLÿÿÿÿÿ1ÿÿÿÿÿLÿ|
      ÿÿ|ÿLÿLÿLÿÿÿÿÿ2ÿÿÿÿÿLÿ|
      ÿÿ|ÿLÿLÿLÿÿÿÿÿ3ÿÿÿÿÿLÿ|
      ÿÿ+-------------------+

      .ÿ
      .ÿ//ÿParticipantsÿnestedÿwithinÿPattern--OPÿdoesn'tÿsay,ÿbutÿmaybeÿ10ÿforÿeachÿpattern?
      .ÿcwfÿIllustration

      .ÿquietlyÿexpandÿ10

      .ÿsortÿpat

      .ÿgenerateÿintÿpidÿ=ÿ_n

      .ÿ
      .ÿ//ÿCountries--participantsÿnestedÿwithinÿoneÿofÿtwo
      .ÿgenerateÿbyteÿcouÿ=ÿmod(_n,ÿ2)

      .ÿ
      .ÿ//ÿDomainsÿ1,ÿ2ÿandÿ3ÿ(AssumesÿsequenceÿofÿDomainÿisÿinvariantlyÿfirst,ÿsecondÿandÿthird)
      .ÿquietlyÿexpandÿ3

      .ÿbysortÿpid:ÿgenerateÿbyteÿdomÿ=ÿ_n

      .ÿ
      .ÿ//ÿHigh-LowÿConditions
      .ÿfrlinkÿm:1ÿpatÿdom,ÿframe(Patterns)
      ÿÿ(allÿobservationsÿinÿframeÿIllustrationÿmatched)

      .ÿfrgetÿconÿ=ÿcon,ÿfrom(Patterns)
      ÿÿ(1ÿvariableÿcopiedÿfromÿlinkedÿframe)

      .ÿ
      .ÿ//ÿOutcomeÿvariable--totalsÿ(sumscores)ÿofÿresponsesÿtoÿquestions
      .ÿgenerateÿdoubleÿscoÿ=ÿrnormal(`mean',ÿ`sd')

      .ÿ
      .ÿ*
      .ÿ*ÿBeginÿhereÿ(someÿinteractionsÿareÿcontainedÿwithinÿtheÿpattern)
      .ÿ*
      .ÿquietlyÿmixedÿscoÿ///
      >ÿÿÿÿÿÿÿÿÿi.couÿi.patÿi.cou##i.patÿ///
      >ÿÿÿÿÿÿÿÿÿi.domÿi.conÿi.dom#i.conÿ///
      >ÿÿÿÿÿÿÿÿÿi.cou#i.domÿi.cou#i.conÿi.cou#i.dom#i.conÿ||ÿ///
      >ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿpid:ÿ,ÿremlÿdfmethod(kroger)ÿnolog

      .ÿestatÿsd,ÿvariance

      ------------------------------------------------------------------------------
      ÿÿRandom-effectsÿparametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿerr.ÿÿÿÿÿ[95%ÿconf.ÿinterval]
      -----------------------------+------------------------------------------------
      pid:ÿIdentityÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(_cons)ÿ|ÿÿÿÿÿ6.0302ÿÿÿÿ4.83191ÿÿÿÿÿÿ1.253939ÿÿÿÿ28.99926
      -----------------------------+------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(Residual)ÿ|ÿÿÿ55.47037ÿÿÿ6.405164ÿÿÿÿÿÿ44.23569ÿÿÿÿ69.55835
      ------------------------------------------------------------------------------

      .ÿcontrastÿcouÿpatÿcou#patÿdomÿconÿdom#conÿcou#domÿcou#conÿcou#dom#con,ÿsmall

      Contrastsÿofÿmarginalÿlinearÿpredictions

      Margins:ÿasbalanced

      -----------------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿddfÿÿÿÿÿÿÿÿÿÿÿFÿÿÿÿÿÿÿÿP>F
      -------------+---------------------------------------------
      scoÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿcouÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿ64.00ÿÿÿÿÿÿÿÿ0.11ÿÿÿÿÿ0.7417
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿpatÿ|ÿÿÿÿÿÿÿÿÿÿ7ÿÿÿÿÿÿ80.68ÿÿÿÿÿÿÿÿ0.82ÿÿÿÿÿ0.5699
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿcou#patÿ|ÿÿÿÿÿÿÿÿÿÿ7ÿÿÿÿÿÿ80.68ÿÿÿÿÿÿÿÿ0.94ÿÿÿÿÿ0.4833
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿdomÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿ150.00ÿÿÿÿÿÿÿÿ1.09ÿÿÿÿÿ0.3388
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿconÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿ150.00ÿÿÿÿÿÿÿÿ0.21ÿÿÿÿÿ0.6447
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿdom#conÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿ150.00ÿÿÿÿÿÿÿÿ0.72ÿÿÿÿÿ0.4906
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿcou#domÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿ150.00ÿÿÿÿÿÿÿÿ4.77ÿÿÿÿÿ0.0098
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿcou#conÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿ150.00ÿÿÿÿÿÿÿÿ0.01ÿÿÿÿÿ0.9189
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿcou#dom#conÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿ150.00ÿÿÿÿÿÿÿÿ0.83ÿÿÿÿÿ0.4360
      -----------------------------------------------------------

      .ÿ
      .ÿanovaÿscoÿ///
      >ÿÿÿÿÿÿÿÿÿcouÿpatÿcou#patÿ/ÿpid|cou#patÿ///
      >ÿÿÿÿÿÿÿÿÿdomÿconÿdom#conÿ///
      >ÿÿÿÿÿÿÿÿÿcou#domÿcou#conÿcou#dom#con,ÿrepeated(domÿcon)

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿÿÿÿ240ÿÿÿÿR-squaredÿÿÿÿÿ=ÿÿ0.4420
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRootÿMSEÿÿÿÿÿÿ=ÿÿÿÿ7.44784ÿÿÿÿAdjÿR-squaredÿ=ÿÿ0.1109

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿPartialÿSSÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿÿMSÿÿÿÿÿÿÿÿFÿÿÿÿProb>F
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ------------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿModelÿ|ÿÿ6590.2248ÿÿÿÿÿÿÿÿÿ89ÿÿÿÿ74.04747ÿÿÿÿÿÿ1.33ÿÿ0.0599
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcouÿ|ÿÿ8.0628573ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ8.0628573ÿÿÿÿÿÿ0.11ÿÿ0.7417
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿpatÿ|ÿÿ418.30656ÿÿÿÿÿÿÿÿÿÿ7ÿÿÿ59.758081ÿÿÿÿÿÿ0.81ÿÿ0.5803
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcou#patÿ|ÿÿÿÿ473.689ÿÿÿÿÿÿÿÿÿÿ7ÿÿÿ67.669857ÿÿÿÿÿÿ0.92ÿÿ0.4972
      ÿÿÿÿÿÿÿÿÿÿÿÿÿpid|cou#patÿ|ÿÿÿ4707.904ÿÿÿÿÿÿÿÿÿ64ÿÿÿÿÿÿ73.561ÿÿ
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ------------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿdomÿ|ÿÿ120.93272ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ60.466361ÿÿÿÿÿÿ1.09ÿÿ0.3388
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿconÿ|ÿÿ11.845443ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ11.845443ÿÿÿÿÿÿ0.21ÿÿ0.6447
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿdom#conÿ|ÿÿ79.380923ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ39.690462ÿÿÿÿÿÿ0.72ÿÿ0.4906
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcou#domÿ|ÿÿ528.81697ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ264.40849ÿÿÿÿÿÿ4.77ÿÿ0.0098
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcou#conÿ|ÿÿ.57646677ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ.57646677ÿÿÿÿÿÿ0.01ÿÿ0.9189
      ÿÿÿÿÿÿÿÿÿÿÿÿÿcou#dom#conÿ|ÿÿÿ92.60885ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ46.304425ÿÿÿÿÿÿ0.83ÿÿ0.4360
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿ8320.5532ÿÿÿÿÿÿÿÿ150ÿÿÿ55.470355ÿÿ
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ------------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTotalÿ|ÿÿ14910.778ÿÿÿÿÿÿÿÿ239ÿÿÿ62.388193ÿÿ


      Between-subjectsÿerrorÿterm:ÿÿpid|cou#pat
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLevels:ÿÿ80ÿÿÿÿÿÿÿÿ(64ÿdf)
      ÿÿÿÿÿLowestÿb.s.e.ÿvariable:ÿÿpid
      ÿÿÿÿÿCovarianceÿpooledÿover:ÿÿcou#patÿÿÿ(forÿrepeatedÿvariables)

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

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ------------ÿProbÿ>ÿFÿ------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿÿÿÿÿdfÿÿÿÿÿÿFÿÿÿÿRegularÿÿÿÿH-FÿÿÿÿÿÿG-GÿÿÿÿÿÿBox
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ------------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿdomÿ|ÿÿÿÿÿÿ2ÿÿÿÿÿ1.09ÿÿÿ0.3388ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.2998
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcou#domÿ|ÿÿÿÿÿÿ2ÿÿÿÿÿ4.77ÿÿÿ0.0098ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.0321
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿÿÿ150
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------------------------------------------------------------

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

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ------------ÿProbÿ>ÿFÿ------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿÿÿÿÿdfÿÿÿÿÿÿFÿÿÿÿRegularÿÿÿÿH-FÿÿÿÿÿÿG-GÿÿÿÿÿÿBox
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ------------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿconÿ|ÿÿÿÿÿÿ1ÿÿÿÿÿ0.21ÿÿÿ0.6447ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.6447
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcou#conÿ|ÿÿÿÿÿÿ1ÿÿÿÿÿ0.01ÿÿÿ0.9189ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.9189
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿÿÿ150
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------------------------------------------------------------

      Repeatedÿvariables:ÿdom#con
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHuynh-Feldtÿepsilonÿÿÿÿÿÿÿÿ=ÿÿÿÿ.
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿGreenhouse-Geisserÿepsilonÿ=ÿÿÿÿ.
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBox'sÿconservativeÿepsilonÿ=ÿÿ0.5000

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ------------ÿProbÿ>ÿFÿ------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿÿÿÿÿdfÿÿÿÿÿÿFÿÿÿÿRegularÿÿÿÿH-FÿÿÿÿÿÿG-GÿÿÿÿÿÿBox
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ------------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿdom#conÿ|ÿÿÿÿÿÿ2ÿÿÿÿÿ0.72ÿÿÿ0.4906ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.4003
      ÿÿÿÿÿÿÿÿÿÿÿÿÿcou#dom#conÿ|ÿÿÿÿÿÿ2ÿÿÿÿÿ0.83ÿÿÿ0.4360ÿÿÿÿÿ.ÿÿÿÿÿÿÿÿ.ÿÿÿÿÿÿ0.3638
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿÿÿ150
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------------------------------------------------------------

      .ÿ
      .ÿexit

      endÿofÿdo-file


      .

      Comment


      • #4
        I truly appreciate this. Thank you so much for your help. You are right that this post is a duplicate of the link. I came across the nested anova while doing more research after uploading the initial post, and I wanted to ask if doing a nested anova is an option. But the system did not allow me to edit the post so I posted a new one. I am sorry if I shouldn't have done this.

        Conceptualizing 'patterns' as opposed to low vs. high condition definitely seems like a game-changer. I haven't thought of this.

        The RQ was "do country, domain, condition, and their interactions have a significant effect on the total score?" Specifically speaking, domain consisted of three different domains representing three different characteristics of disability (i.e., social, behavior, and communication); condition was the level of support needs of autistic people described in the vignette; and total score was attitudes toward the disability. Participants read a total of three vignettes (one from each domain), and they were randomized to read either a character who shows high support needs or low support needs within each domain. Essentially, I wanted to see if participants show different levels of attitudes depending on their country, or domains of characteristics of a disability, and level of support needs.

        After reading your explanation, I have been thinking of how to interpret the main effect of the pattern or condition, but I haven't been able to get a clear solution. It is very possible that I am not 100% understanding the stata commands from above. Why should all 1) cou#pat, 2) pid | cou#pat, 3) cou#con be included in the anova command? Also, how would I interpret the significant main effect of the following?

        - pat
        - con
        - cou#pat
        - cou#con

        Currently, I do understand what you mean by pattern of condition sequence. I am just having trouble grasping how the concept of pattern is being included in the final anova command, and it means to include the patterns in the final model. Could you give me additional guidance on this?

        Again, thank you so much for your help. I am truly grateful!!

        So

        Comment


        • #5
          Originally posted by So Kim View Post
          Why should all 1) cou#pat, 2) pid | cou#pat, 3) cou#con be included in the anova command?
          They don't have to be included if you believe that they don't belong in a statistical model of the phenomenon under study. But you did include country in your initial post above and so it seems that you believe that it belongs among the explanatory variables in your model. Study participants are nested under the combination (intersection) of country and randomization group, the latter being what the pattern variable represents. So, country, pattern and their interaction are the so-called between-subject factors in the ANOVA, and the proper error term for them is the subjects-within-groups term, which is pid | cou#pat.

          Also, how would I interpret the significant main effect of the following?
          If you have a significant interaction term, however defined, then you wouldn't typically try to interpret the main effects that are included in it. Conventionally, interactions after ANOVA are interpreted with the aid of profile plots and similar graphical approaches. In Stata, you'd make use of the combination of -margins- and -marginsplot- for this.

          I am just having trouble grasping how the concept of pattern is being included in the final anova command, and it means to include the patterns in the final model. Could you give me additional guidance on this?
          As mentioned above, it is effectively your randomization group. You would normally include your randomization group in your ANOVA model.

          Comment


          • #6
            Thank you for your response! While your responses are very helpful, I have a few follow-up questions. I realize that I should have stated my question more clearly.

            In my earlier post, I asked whether I should include 1) cou#pat, 2) pid | cou#pat, 3) cou#con in the anova command in order to understand what it means to include both pattern and condition as variables. You are correct that I wanted to include country in my model. I also understand that the pattern is now the randomization group that is included in the model. But even if I get a significant main effect of pattern, I don't think it would help me answer my research question, which is "do level of support needs (or high vs. low condition) or its interaction with domain and/or country have an effect on dv (or attitudes)"? In order to answer the RQ, I think I should be focusing on the results associated with the 'con' variable, but not 'pat' variable. So, for instance, *if* there is a significant main effect of condition ('con'), I would run a posthoc analysis, and based on the results of posthoc analysis, I want to say something like "participants in low condition reported more positive attitudes."

            My current confusion seems to be stemming from the fact that I can't wrap my head around the following command:

            anova sco ///
            cou pat cou#pat / pid | cou#pat ///
            dom con dom#con ///
            cou#dom cou#con cou#dom#con, repeated (dom con)

            1) Does this command allow me to examine the effect of condition ('con' variable)? If so, why does including pattern as a randomization group allow this?
            2) Why is 'con' variable included as a repeated between-subject variable?
            3) Could you help me conceptualize the command above in more general terms? What variables are embedded in which variables, and what are between and within subject variables? What kind of anova is being used?
            4) In order to run the command, what should data look like? I have been trying to recreate the data based on our commands before "begin here," but I am not 100% sure.

            Again, I really appreciate you taking the time to review this! I can't thank you enough!

            So

            Comment


            • #7
              Originally posted by So Kim View Post
              1) Does this command allow me to examine the effect of condition ('con' variable)?
              Yes.

              If so, why does including pattern as a randomization group allow this?
              Why would it not allow it? The randomization group accounts only for the sequence of conditions to which the participant was exposed (assigned), and doesn't preclude an overall effect of condition.

              2) Why is 'con' variable included as a repeated between-subject variable?
              It's not. It's in the model as a within-subject (repeated-measures) factor.

              3) Could you help me conceptualize the command above in more general terms? What variables are embedded in which variables, and what are between and within subject variables? What kind of anova is being used?
              It's a conventional repeated-measures ANOVA, like a split-plot design, with two between-subjects factors.

              4) In order to run the command, what should data look like? I have been trying to recreate the data based on our commands before "begin here," but I am not 100% sure.
              You have an older release of Stata, one that doesn't have frames, and so you'd create a separate dataset with the participants' IDs and their assigned condition sequences (patterns) and then join that back to your main dataset using -merge-. Based upon inspection of your snippet above, it looks as if you can get this other dataset by keeping only three variables from your main dataset: participant ID, Domain and Condition. Use -reshape wide- and then concatenate the conditions, retaining their temporal order, into a single variable to get the patterns. Something along the lines of the following (untested).
              Code:
              use <main dataset>
              keep ID Domain Condition
              reshape wide Condition, i(ID) j(Domain)
              generate int pat = 100 * Condition1 + 10 * Conditioin2 + Condition3
              merge 1:m ID using <main dataset>, assert(match) nogenerate noreport

              Comment


              • #8
                Thank you so much! This is really helpful. I think I am starting to get it. I have three final (hopefully) questions.

                1) You said the model is "a conventional repeated-measures ANOVA, like a split-plot design, with two between-subjects factors." So the model includes two between-subject factors (country and pattern), and two within-subject factors (condition and domain). Am I understanding this correctly?

                2) What I can't still seem to wrap my head around is why and how including randomization group (pat) in the model allows me to examine the effect of condition.

                I am assuming that you thought to include the pat variable because I would not be able to examine the effect of the condition variable without including the pat variable (randomization group that takes the sequence of conditions into account). Is this correct? If so, why do I need to include the randomization group in order to examine the condition effect?

                And by including the pat variable into the model, I can examine the effect of the condition, right? Then, why does including the pat variable allow me to examine the condition variable? The mechanism and rationale behind including the pat variable keep confusing me.

                3) Thank you for explaining how the data should look like. Would it be possible to show me a brief example of the first few rows? I should also keep country along with the domain and condition, right?

                I am sorry for bogging you down with my follow-up questions. I really truly appreciate your help!

                So



                Comment


                • #9
                  Originally posted by So Kim View Post
                  1) . . . the model includes two between-subject factors (country and pattern), and two within-subject factors (condition and domain). Am I understanding this correctly?
                  Yes.

                  2) What I can't still seem to wrap my head around is why and how including randomization group (pat) in the model allows me to examine the effect of condition.

                  I am assuming that you thought to include the pat variable because I would not be able to examine the effect of the condition variable without including the pat variable (randomization group that takes the sequence of conditions into account). Is this correct?
                  No. We seemed to have misunderstood each other. You are able to fit a model that includes the condition variable without including a separate variable of its sequence. But, because you randomized participants in effect by condition sequence, you'd usually include that grouping variable in the model. (I misconstrued your question earlier above as implying that including pattern in the ANOVA model would necessarily prohibit examination of the effect of condition.)

                  If so, why do I need to include the randomization group in order to examine the condition effect?
                  You do not; as mentioned above, including it is not mandatory in order to obtain test statistics for the condition variable. See below for an illustration of this using your snippet of data.

                  And by including the pat variable into the model, I can examine the effect of the condition, right? Then, why does including the pat variable allow me to examine the condition variable?
                  Again, a misunderstanding: including the condition sequence grouping variable is not obligatory to fit a model containing the condition variable.

                  It seems that you are not concerned with the potential for so-called learning effects, because your study design does not thoroughly examine that potential for confounding. So, if sequence effects (carryover etc.) are not of concern in the context of your phenomenon under study, then I suppose you would not learn anything by including the pattern variable in your ANOVA model. And, inasmuch as it's not required in order to get a mean square and test statistic for the condition (again, see below), then it would be up to you to judge its necessity in the model on scientific grounds. (For study designs involving phenomena where sequence / learning effects are of concern, take a look at the examples in the help files and user manual entries for Stata's -pk- suite of commands:
                  Code:
                  help pk
                  and follow the hyperlinks.)

                  3) . . . Would it be possible to show me a brief example of the first few rows? I should also keep country along with the domain and condition, right?
                  Below, I've illustrated my suggestion in #7 (typo corrected) using your snippet of data, listing the first two participants' rows of data. (This is followed by the demonstration that you don't need to include the pattern variable in your ANOVA model in order to get test statistics for terms involving the condition variable.)

                  .ÿ
                  .ÿversionÿ17.0

                  .ÿ
                  .ÿclearÿ*

                  .ÿ
                  .ÿquietlyÿinputÿbyte(IDÿCountryÿDomainÿCondition)ÿdoubleÿTotal

                  .ÿ
                  .ÿtempfileÿmain_dataset

                  .ÿquietlyÿsaveÿ`main_dataset'

                  .ÿ
                  .ÿkeepÿIDÿDomainÿCondition

                  .ÿquietlyÿreshapeÿwideÿCondition,ÿi(ID)ÿj(Domain)

                  .ÿgenerateÿintÿpatÿ=ÿ100ÿ*ÿCondition1ÿ+ÿ10ÿ*ÿCondition2ÿ+ÿCondition3

                  .ÿmergeÿ1:mÿIDÿusingÿ`main_dataset',ÿassert(match)ÿnogenerateÿnoreport

                  .ÿ
                  .ÿ*
                  .ÿ*ÿBeginÿhere
                  .ÿ*
                  .ÿsortÿIDÿDomain

                  .ÿlistÿpatÿIDÿCountryÿDomainÿConditionÿTotalÿinÿ1/6,ÿnoobsÿabbreviate(20)ÿsepby(ID)

                  ÿÿ+-----------------------------------------------------+
                  ÿÿ|ÿpatÿÿÿIDÿÿÿCountryÿÿÿDomainÿÿÿConditionÿÿÿÿÿÿÿTotalÿ|
                  ÿÿ|-----------------------------------------------------|
                  ÿÿ|ÿ222ÿÿÿÿ1ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿÿÿÿÿ2ÿ|
                  ÿÿ|ÿ222ÿÿÿÿ1ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿÿÿÿÿ2ÿ|
                  ÿÿ|ÿ222ÿÿÿÿ1ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ3ÿÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ1.8333333ÿ|
                  ÿÿ|-----------------------------------------------------|
                  ÿÿ|ÿ111ÿÿÿÿ2ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ2.4166667ÿ|
                  ÿÿ|ÿ111ÿÿÿÿ2ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ1.9166666ÿ|
                  ÿÿ|ÿ111ÿÿÿÿ2ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿ3ÿÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ3.4166667ÿ|
                  ÿÿ+-----------------------------------------------------+

                  .ÿ
                  .ÿanovaÿTotalÿCountryÿ/ÿID|CountryÿCountry##Domain##Condition

                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿÿÿÿÿ18ÿÿÿÿR-squaredÿÿÿÿÿ=ÿÿ0.9739
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRootÿMSEÿÿÿÿÿÿ=ÿÿÿÿ.243432ÿÿÿÿAdjÿR-squaredÿ=ÿÿ0.8520

                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿPartialÿSSÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿÿMSÿÿÿÿÿÿÿÿFÿÿÿÿProb>F
                  ÿÿÿÿÿÿÿ------------------+----------------------------------------------------
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿModelÿ|ÿÿ6.6277778ÿÿÿÿÿÿÿÿÿ14ÿÿÿÿ.4734127ÿÿÿÿÿÿ7.99ÿÿ0.0564
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿCountryÿ|ÿÿ1.0371706ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ1.0371706ÿÿÿÿÿÿ1.10ÿÿ0.3544
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿID|Countryÿ|ÿÿ3.7886571ÿÿÿÿÿÿÿÿÿÿ4ÿÿÿ.94716428ÿÿ
                  ÿÿÿÿÿÿÿ------------------+----------------------------------------------------
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDomainÿ|ÿÿ.16655845ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ.08327922ÿÿÿÿÿÿ1.41ÿÿ0.3710
                  ÿÿÿÿÿÿÿÿÿÿCountry#Domainÿ|ÿÿ.48517292ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ.24258646ÿÿÿÿÿÿ4.09ÿÿ0.1389
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿConditionÿ|ÿÿ.00631787ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ.00631787ÿÿÿÿÿÿ0.11ÿÿ0.7655
                  ÿÿÿÿÿÿÿCountry#Conditionÿ|ÿÿ.68055556ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ.68055556ÿÿÿÿÿ11.48ÿÿ0.0428
                  ÿÿÿÿÿÿÿÿDomain#Conditionÿ|ÿÿ.52319031ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ.26159515ÿÿÿÿÿÿ4.41ÿÿ0.1277
                  ÿÿÿÿÿÿÿÿÿCountry#Domain#ÿ|ÿ
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿConditionÿ|ÿÿ.29696973ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ.29696973ÿÿÿÿÿÿ5.01ÿÿ0.1111
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿ.17777775ÿÿÿÿÿÿÿÿÿÿ3ÿÿÿ.05925925ÿÿ
                  ÿÿÿÿÿÿÿ------------------+----------------------------------------------------
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTotalÿ|ÿÿ6.8055555ÿÿÿÿÿÿÿÿÿ17ÿÿÿÿ.4003268ÿÿ

                  .ÿ
                  .ÿexit

                  endÿofÿdo-file


                  .

                  Comment


                  • #10
                    Thank you so much for taking the time to review my additional questions. I could not perfectly wrap my head around the commands you suggested, and I guess that is because we misunderstood each other. I should have been more explicit in my question so I am so sorry for the trouble, and I am glad that we resolved that.

                    I was hesitant to include the condition variable in the model because the condition variable is both within-subject and between-subject variables, not because of the learning effect. For some participants (e.g., Participant 1, who were assigned to all Condition One across domains, and Participant 2, who were assigned to Condition 2 across the domains), the Condition variable is a between-subject variable. For others (e.g., Participant 3, who were assigned to both Conditions One and Two depending on the domain), the Condition variable is a with-in subject variable. That said, I wasn't sure if and how I could include the Condition variable into the anova model along with the country and domain variables (where the Domain variable is a within-subject repeated variable, and the Country is a between-subject variable). Is there a Stata command that allows me to include this variable, or is it just not doable?

                    Thank you so much again! I truly appreciate your help!

                    So

                    Comment


                    • #11
                      Originally posted by So Kim View Post
                      I wasn't sure if and how I could include the Condition variable into the anova model . . . Is there a Stata command that allows me to include this variable, or is it just not doable?
                      Yes: include it along with the pattern (condition sequence) as I show above in #3.

                      It is the pattern of conditions (HHH, LLL, HLH, etc.) that is a between-subjects factor and not the condition itself, which is allowed to vary within participants across domains..

                      Comment


                      • #12
                        I can't thank you enough. I learned a lot from your thread, not only running repeated-measures ANOVA but also formatting the dataset and writing the commands!

                        Comment


                        • #13
                          Glad I could be of some assistance. And thank you for the thread closure.

                          Comment

                          Working...
                          X