Announcement

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

  • Question about using linear mixed model to comparison mean fractional anisotropy for neuroimaging data

    Dear scientists,

    I have a question about how to compare mean for two different groups by using linear mixed model.

    Each mask nests each braintract, brain tract nest each individiual. (Many people in these two groups, only show two people's brain structure for illustration)
    Click image for larger version

Name:	WeChat Image_20190208135411.jpg
Views:	1
Size:	79.9 KB
ID:	1482751

    So since the FA value of each mask in the same braintract, instead of using two sample t-test or ANOVA, I fit nest linear mixed model as this
    Code:
    mixed fa group i.sex age || id: || braintract: , vce(robust) cov(un)
    The coefficients of the output regression table only show the effect that only compare the first level.
    Click image for larger version

Name:	WeChat Screenshot_20190208141147.png
Views:	1
Size:	54.3 KB
ID:	1482752

    1, My question is how can I compare different FA mean between two groups for each mask.
    I expect to get the comparison of FA mean for two group
    Group A v.s. Group N
    Mask1braintract1 v.s. Mask1braintract1
    Mask1braintract2 v.s. Mask1braintract2
    Mask1braintract3 v.s. Mask1braintract3
    Mask2braintract1 v.s. Mask2braintract1
    Mask2braintract2 v.s. Mask2braintract2
    Mask2braintract3 v.s. Mask2braintract3
    Mask3braintract1 v.s. Mask3braintract1
    Mask3braintract2 v.s. Mask3braintract2
    Mask3braintract3 v.s. Mask3braintract3



    2, Another question is, since mask nest in braintract, braintract nest in individual, I already put id and braintract as random effect, should I consider mask as random effect like this?
    Code:
    ||id: || braintract: || mask
    Below is example of my data structure
    Click image for larger version

Name:	WeChat Screenshot_20190208143833.png
Views:	1
Size:	45.1 KB
ID:	1482753




    Thank you so much for looking at my post!

    Jack Liang
    Last edited by Liang Wang Jack; 08 Feb 2019, 12:51.

  • #2
    I wonder if you are modeling this wrong in the first place. When you say
    Another question is, since mask nest in braintract, braintract nest in individual, I already put id and braintract as random effect, should I consider mask as random effect like this?
    This means that what is called braintract1 in person 1 has nothing to do with braintract1 in person 2: these could just be any old brain tracts. Similarly saing that mask is nested within braintract implies that mask1 in braintract1 has nothing to do with mask1 in braintract2 of the same person (nor of braintract1 in some other person) --these are just any old masks. Is that really true? Maybe it is, but it really strikes me as an odd design for a neuroimaging experiment.

    To me it seems more likely that braintract1 refers to some particular anatomical structure and that in your data braintract 1 would always refer to that particular anatomical structure regardless of which patient it is. If that's the case, then braintract is not nested in patient: it is crossed with patient. If this is the case, I would then also wonder how many different braintracts are being studied. If the number is small (which is also what I would expect in a neuroimaging study) then I would represent it as a fixed effect, particularly if you want the kind of contrasts you are talking about involving braintract in #1. Similar considerations may apply to mask.

    Then I would point out that since your model contains no interactions of the group variable, it necessarily implies that the A vs N contrast is going to be exactly the same for all brain tracts and masks and combinations thereof.

    I really have the sense that the model you want is more like:

    Code:
    mixed fa i.group##i.braintract##i.mask i.sex age || id: , vce(robust)
    margins braintract#mask, dydx(group)
    (I removed -cov(un)- because in this model there is only one random intercept being estimated, so the covariance matrix of the random effects is a 1x1 matrix, and -cov()- does nothing. No harm would be done by leaving it in, but it is pointless in this context.)

    Comment


    • #3
      Dear Clyde,
      Thank you so much for your response.

      The picture below shows one individual's one brain tracts: corona radiata (other brain tracts do not show here), with 3 masks, Mask1(blue), Mask2 (green), Mask3(Red). At this point, do you think the mask nest in brain tract, and the brain tract nest in individual? I could not understand how the braintracts crossed with patient. Because each patient have its own brain tracts.

      Thanks!
      Jack Liang
      Click image for larger version

Name:	WeChat Image_20190208161419.jpg
Views:	1
Size:	1.48 MB
ID:	1482780

      Comment


      • #4
        The corona radiata is a specific anatomical part of the brain. Did you image the corona radiata in every person? If so, brain tract is crossed with patient, not nested in patient. That's what "crossed with" means.

        Now, for mask it may be more complicated. Probably mask1 in the corona radiata is not the same thing as mask 1 in some other brain tract. But is mask 1 in one patient's corona radiata the same thing as mask 1 in any other patient's corona radiata? Do I have this right? Then if so, mask is not crossed with braintract, but is nested within it. However, if the number of masks in any given brain tract is small (and I would definitely consider 3 small), I would still treat it as a fixed effect. Moreover, the combination of braintract and mask would be crossed with patient. So this would work as:

        Code:
        egen specific_mask = group(braintract mask), label
        mixed fa i.group#i.specific_mask i.sex age || id: , vce(robust)
        margins specific_mask, dydx(group)

        Comment


        • #5
          Originally posted by Clyde Schechter View Post
          The corona radiata is a specific anatomical part of the brain. Did you image the corona radiata in every person? If so, brain tract is crossed with patient, not nested in patient. That's what "crossed with" means.

          Now, for mask it may be more complicated. Probably mask1 in the corona radiata is not the same thing as mask 1 in some other brain tract. But is mask 1 in one patient's corona radiata the same thing as mask 1 in any other patient's corona radiata? Do I have this right? Then if so, mask is not crossed with braintract, but is nested within it. However, if the number of masks in any given brain tract is small (and I would definitely consider 3 small), I would still treat it as a fixed effect. Moreover, the combination of braintract and mask would be crossed with patient. So this would work as:

          Code:
          egen specific_mask = group(braintract mask), label
          mixed fa i.group#i.specific_mask i.sex age || id: , vce(robust)
          margins specific_mask, dydx(group)
          For
          Code:
          Did you image the corona radiata in every person?
          Yes, I imaged the corona radiata, internal capsule, corpus callosum, cingulum bundle and rest white matter in every person. Each person's each tract all have 3 masks.
          For
          Code:
           Probably mask1 in the corona radiata is not the same thing as mask 1 in some other brain tract. But is mask 1 in one patient's corona radiata the same thing as mask 1 in any other patient's corona radiata? Do I have this right?
          Yes, mask1 in the corona radiata is not the same thing as mask 1 in some other brain tract. Mask1 in other patient's corona radiata is the same thing as mask1 in any other patient's corona radiata, but, the mask shape may not the same as other person's.

          Below pictures are the description for nest or crossed. It looks like my research is the same as "nested". Because two person do not share the same corona radiata or any other four tracts. And masks on each tract do not share by person either. So now, for the brain tract, does these brain tracts still crossed with patients? I am a little confused.

          Best,
          Jack Liang

          This is the "nested". (Picture found from the web https://stats.stackexchange.com/ques...they-specified)
          Click image for larger version

Name:	Capture1.PNG
Views:	1
Size:	26.7 KB
ID:	1483492



          This is the "crossed". (Picture found from the web https://stats.stackexchange.com/ques...they-specified)
          Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	18.9 KB
ID:	1483493



          This is my research.
          Click image for larger version

Name:	30047179.jpg
Views:	1
Size:	657.0 KB
ID:	1483494

          Click image for larger version

Name:	702575131.jpg
Views:	1
Size:	641.8 KB
ID:	1483495

          Comment


          • #6
            You clearly have tract crossed with patient. Look at the picture you posted from stack exchange for crossed: if you substitute patient for school and tract for class, it clearly is the same relationship.

            The situation with regard to mask is less clear. The question is not whether mask1 in patient1's corona radiata is the same as mask 1 in patient2's corona radiata. The question is whether mask1 in patient1's corona radiata is the same as mask1 in patient1's corpus callosum and all the other tracts. If so, then mask, too, is crossed with tract. If not, then it is nested within.

            Comment


            • #7
              Originally posted by Liang Wang Jack View Post
              ...

              Below pictures are the description for nest or crossed. It looks like my research is the same as "nested". Because two person do not share the same corona radiata or any other four tracts. And masks on each tract do not share by person either. So now, for the brain tract, does these brain tracts still crossed with patients? I am a little confused.

              I'd agree with Clyde that your tracts are crossed with patients, not nested.

              Students (mostly, I suppose) tend to go to one school at a time. Hence, they are nested within schools (or rather, students are nested in classes, which are nested within schools). If classes spent half their time at one school and half their time at another school, then sure, I guess that would be crossed.

              All humans have the same anatomical features of the brain that you imaged (i.e. tracts). I have no idea what anisotropy is, but I would bet that across individuals, the anisotropy of our corpus callosi (or whatever the plural is) is similar to some degree. So, I'd vote tracts being crossed.

              For masks, you indicated that your masks correspond to colors, so that actually sounds like a point in favor of crossed to me. But this would depend on substantive knowledge. You said that the shape of the mask differs from person to person, but is that because the brain structures are different in shape? What is the main, substantive reason each mask varies within a brain tract, and across people? Are you expecting red masks to have some pretty similar effect on anisotropy over individuals?
              Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

              When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

              Comment


              • #8
                Originally posted by Clyde Schechter View Post
                You clearly have tract crossed with patient. Look at the picture you posted from stack exchange for crossed: if you substitute patient for school and tract for class, it clearly is the same relationship.

                The situation with regard to mask is less clear. The question is not whether mask1 in patient1's corona radiata is the same as mask 1 in patient2's corona radiata. The question is whether mask1 in patient1's corona radiata is the same as mask1 in patient1's corpus callosum and all the other tracts. If so, then mask, too, is crossed with tract. If not, then it is nested within.
                Dear Dr.Clyde
                I very appreciate your response.

                For example, the mask1 in a patient's different braintracts all named as mask1, but different tracts have different mask shape (or area) and different FA value. Below is a clear picture. So base on this situation, mask is nested within tract, correct?

                Best regards,
                Jack Liang
                Click image for larger version

Name:	417095783.jpg
Views:	1
Size:	1.06 MB
ID:	1483548

                Comment


                • #9
                  Yes, based on what you say now, mask is nested within tract.

                  Comment


                  • #10
                    Actually, can I push back on this a bit?

                    I don't pretend to know anything about neuroimaging, but it seems that fractional anisotropy may reflect something like fiber density in each brain structure. The higher the density of fibers, the more they would absorb light or other incoming radiation (or diffuse it randomly, or whatever it is that anisotropy reflects).

                    In post 3, Jack said that each mask corresponded to a color. Maybe the mask color is absorbing certain wavelengths of light or other radiation in such a way that would affect the degree of anisotropy, and we'd expect similar colors to have similar-ish effects across patients. It may be that the effects of mask size are not material in comparison to that effect. If so, that sounds more like a fixed, or maybe crossed, effect.

                    When I think of students nested in classes, I am thinking that in principle, a student could have selected from one of a number of schools. Even controlling for observables, a student in one class could be quite different from a student in another class. If you're applying the same color of mask to a particular brain structure in a patient and measuring anisotropy, and then repeating that same color across patients, then that sounds more like a fixed or crossed effect to me.

                    If the mask color is no more than a symbolic reference, then Jack can safely ignore this post. I have a feeling it may not be. And as usual, I could be wrong! So, I'd be open to hearing other readers thoughts.

                    In my work, we usually have patients nested within physicians or hospitals, so I haven't needed to worry much about crossed effects.
                    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

                    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

                    Comment


                    • #11
                      Originally posted by Weiwen Ng View Post

                      I'd agree with Clyde that your tracts are crossed with patients, not nested.

                      Students (mostly, I suppose) tend to go to one school at a time. Hence, they are nested within schools (or rather, students are nested in classes, which are nested within schools). If classes spent half their time at one school and half their time at another school, then sure, I guess that would be crossed.

                      All humans have the same anatomical features of the brain that you imaged (i.e. tracts). I have no idea what anisotropy is, but I would bet that across individuals, the anisotropy of our corpus callosi (or whatever the plural is) is similar to some degree. So, I'd vote tracts being crossed.

                      For masks, you indicated that your masks correspond to colors, so that actually sounds like a point in favor of crossed to me. But this would depend on substantive knowledge. You said that the shape of the mask differs from person to person, but is that because the brain structures are different in shape? What is the main, substantive reason each mask varies within a brain tract, and across people? Are you expecting red masks to have some pretty similar effect on anisotropy over individuals?
                      Hi Weiwen,

                      Thank you very much for your response.

                      FA is just a numerical value generate by some Diffusion Tensor Imaging software

                      The color was generate by Matlab package. When this Matlab package processing imaging data, if it found some part of the imaging area is very bright(which means high FA value, maybe disease area), it will color this area red, if less bright, it will color green, if less less bright, color blue. So for example, the mask1 shape is different between tracts in a person. Also like mask1 in a tract is different from other person mask1 (corona rediata).

                      Previously, we use two sample T-test to compare FA value for tow groups Normal v.s. Abnormal. We compare 1) Masks FA for two group, 2)compare Tract FA for two group and 3) compare Mask on tract for two group. (We have all response variable FA value type for 1), 2), 3) , so we can compare).

                      But, T-test or ANOVA is not appropriate because the crossed or nested for the tract and mask, so now we want to build a mix model to see whether there are significant different of FA values for masks, tracts between 2 groups, especially focusing on the specific mask on the specific tract.

                      Click image for larger version

Name:	1073149675.jpg
Views:	1
Size:	583.9 KB
ID:	1483558

                      Comment


                      • #12
                        Originally posted by Clyde Schechter View Post
                        The corona radiata is a specific anatomical part of the brain. Did you image the corona radiata in every person? If so, brain tract is crossed with patient, not nested in patient. That's what "crossed with" means.

                        Now, for mask it may be more complicated. Probably mask1 in the corona radiata is not the same thing as mask 1 in some other brain tract. But is mask 1 in one patient's corona radiata the same thing as mask 1 in any other patient's corona radiata? Do I have this right? Then if so, mask is not crossed with braintract, but is nested within it. However, if the number of masks in any given brain tract is small (and I would definitely consider 3 small), I would still treat it as a fixed effect. Moreover, the combination of braintract and mask would be crossed with patient. So this would work as:

                        Code:
                        egen specific_mask = group(braintract mask), label
                        mixed fa i.group#i.specific_mask i.sex age || id: , vce(robust)
                        margins specific_mask, dydx(group)
                        In addition, after running the model to get the comparison of FA mean for two group to get the comparisons below,
                        Group A v.s. Group N
                        Mask1braintract1 v.s. Mask1braintract1
                        Mask1braintract2 v.s. Mask1braintract2
                        Mask1braintract3 v.s. Mask1braintract3
                        Mask2braintract1 v.s. Mask2braintract1
                        Mask2braintract2 v.s. Mask2braintract2
                        Mask2braintract3 v.s. Mask2braintract3
                        Mask3braintract1 v.s. Mask3braintract1
                        Mask3braintract2 v.s. Mask3braintract2
                        Mask3braintract3 v.s. Mask3braintract3
                        you use
                        Code:
                         
                         margins braintract#mask, dydx(group)
                        I read Stata Manual, it seems that
                        Code:
                        contrast
                        can also do the comparison, I am interested in what is the difference between using
                        Code:
                        margins
                        and
                        Code:
                        contrast
                        to do the comparison, are they same?

                        Best regards,
                        Jack Liang

                        Comment


                        • #13
                          In truth, I don't know much about the -contrast- command and have never used it. It may be that you can get the same results with -contrast-, but I really don't know. I like using -margins- because it is very general and can be used to compute a wide range of post-estimation statistics, and having gotten used to its syntax, I find it very easy to write precisely the commands that will get me the particular statistics I'm interested in. Maybe -contrast- is as good or even better, or maybe it does something rather different; I just don't know. Sorry I can't answer that.

                          Comment


                          • #14
                            Originally posted by Clyde Schechter View Post
                            In truth, I don't know much about the -contrast- command and have never used it. It may be that you can get the same results with -contrast-, but I really don't know. I like using -margins- because it is very general and can be used to compute a wide range of post-estimation statistics, and having gotten used to its syntax, I find it very easy to write precisely the commands that will get me the particular statistics I'm interested in. Maybe -contrast- is as good or even better, or maybe it does something rather different; I just don't know. Sorry I can't answer that.
                            Thank you again! Have a good night!

                            Best,
                            Jack Liang

                            Comment


                            • #15
                              Originally posted by Liang Wang Jack View Post
                              FA is just a numerical value generate by some Diffusion Tensor Imaging software

                              The color was generate by Matlab package. When this Matlab package processing imaging data, if it found some part of the imaging area is very bright(which means high FA value, maybe disease area), it will color this area red, if less bright, it will color green, if less less bright, color blue.
                              So mask is an outcome variable.

                              I recommend that you step back from all of the nested-versus-crossed for a moment and take time to get a conceptual grip on what these neuroimaging terms are, what they represent. They can't be just stuff that pops out of some software package or another.

                              From what you say, mask (i.e., color area) is a crude categorization of fractional anisotropy. Maybe start from that.

                              Comment

                              Working...
                              X