Announcement

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

  • ***HELP*** Which is the easiest and quickest way to estimate effect size for xtmixed (both single and interaction effects)?

    Dear stata listeners,

    I would like to estimate the effect size of two terms and their interaction in a linear mixed model (while controlling for a set of 5 covariates). and I'm not a stata expert so, any kind of suggestion would be much appreciated.

    The syntax for my model is:

    xtmixed `var' cov1 cov2 cov3 cov4 cov5 group##sex || Site:

    Both group and sex have two levels.

    I need effects size (and CI) of:
    - group
    - sex
    - group by sex

    Could you help me to find out the easiest way to get them?
    I checked out this:
    https://stats.idre.ucla.edu/stata/fa...ize-for-mixed/ but, honestly, I found it difficult to understand the procedure.

    Also, I thought to estimate cohen's d using
    margins, over(group)
    margins, over(Sex)
    margins, over(group Sex)
    and estimating SD from SE, but I'm guessing this is NOT an efficient strategy, also not sure how to calculate the interaction term effect size in this way.

    I'm a stata newbie so, any suggestion would be much appreciated.
    Thanks for your help
    Gloria

    Last edited by Maria Gloria Rossetti; 09 May 2018, 03:50.

  • #2
    You are misusing statistical terminology and you are going to get yourself very confused. There is no such thing as "the" effect of group or sex in an interaction model. There are two effects of group (one for each sex) and two separate effects of sex (one for each group). As for the interaction term itself, it defines the difference between effects but it does not, itself have an "effect.".

    Code:
    margins group#sex
    will give you the expected adjusted outcome in each combination of group and sex.

    Code:
    margins sex, dydx(group)
    will show you the effect of group separately for each sex.

    Code:
    margins group, dydx(sex)
    will show you the effect of sex separately for Feach group.

    As for SD vs SE, the SE of a regression coefficient or an effect size is the standard deviation of its sampling distribution. There is no such thing as a separate standard deviation for these estimates.

    Finally, the use of the -over()- option in -margins- is tricky. It is probably not what you want as it will give you effects that are not fully adjusted for your covariates and are derived only from subsets of the data conditioned on particular values. It has its uses, but they are pretty uncommon, and I am fairly confident your situation is not one of them.

    For a better understanding of the -margins- command I strongly recommend you read the excellent Richard Williams' https://www3.nd.edu/~rwilliam/stats/Margins01.pdf. It is written with superb clarity and contains numerous worked examples, some of which are very similar to your problem.

    Comment


    • #3
      Hi Clyde,
      thanks for your help, I found the slides very useful.

      you are misusing statistical terminology and you are going to get yourself very confused. There is no such thing as "the" effect of group or sex in an interaction model. There are two effects of group (one for each sex) and two separate effects of sex (one for each group). As for the interaction term itself, it defines the difference between effects but it does not, itself have an "effect.".

      My mistake, I know what an interaction effect is, conceptually. What I meant here is that from the model I get three coeff (group, sex, group x sex) and I have been asked to estimate the effect size of those effects... here is an example.

      Click image for larger version

Name:	Cattura.PNG
Views:	1
Size:	29.4 KB
ID:	1443641



      Code: margins group#sex
      will give you the expected adjusted outcome in each combination of group and sex.

      Thanks!
      Code:
      margins sex, dydx(group)

      will show you the effect of group separately for each sex.

      Code:
      margins group, dydx(sex)

      will show you the effect of sex separately for Feach group.


      To get those effects I used

      Code:
      pwcompare group#sex, effects

      and it gives me the same results, but taking into account all combinations possible between group (e.g. HC, CB) and Sex (M, F)

      (HC#M) vs (HC#F)
      (CB#F) vs (HC#F)
      (CB#M) vs (HC#F)
      (CB#F) vs (HC#M)
      (CB#M) vs (HC#M)
      (CB#M) vs (CB#F)

      I assume it is correct. Can you confir that?


      As for SD vs SE, the SE of a regression coefficient or an effect size is the standard deviation of its sampling distribution. There is no such thing as a separate standard deviation for these estimates.

      Is still not clear to me what you mean here for the effect size estimation… guess you are saying I can use the marginal means and SE to estimate cohen’s d?

      Best,
      Gloria

      Comment


      • #4
        The use of -pwcompare- as you show it is fine.

        I think I did not previously understand what you meant about effect sizes. The term is ambiguous and I generally use it to refer to the difference in adjusted outcome between the intervention and control groups. You are talking about a standardized effect size such as cohen's d. I am not familiar with the use of that in analyses that include adjustments. I really don't know what you would use for the "standard deviation" here. I'm sorry I can't help with that. Perhaps somebody else reading along knows the answer to this.

        Comment


        • #5
          Ok, thanks anyway for getting back to me.

          Comment

          Working...
          X