Announcement

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

  • Twins comparison

    Greetings all,

    I have data as shown below but a bigger sample and I am wondering how do I compare the twin groups? Is this a fixed effects model? Suppose I wanted to examine the impact of education and stress to predict smoking?
    ID TWINPAIR EDUCATION SMOKING STRESS
    1 1 HS 0 4
    2 1 COL 1 8
    3 2 <HS 1 3
    4 2 <HS 0 8
    Last edited by Leon Edelman; 18 Aug 2017, 15:57.

  • #2
    If you -xtset twinpair-, then basically any kind of regression analysis you want to do can be done with the corresponding -xt- command and you will get within-twinpair estimates.

    Comment


    • #3
      Thanks so much. From a more basic level, what if I want to do a comparison like a t-test. If I had a female versus male variable, I could do something like a t-test to compare smoking between groups. What could I use for twins? Is it to test if the differences are bigger between vs within twin pairs? Thanks again, so mcuh.

      Comment


      • #4
        I think you need to be clearer about what your question is. You can indeed determine if the variation of smoking within twin pairs exceeds the variation between them. The intraclass correlation is a measure of that. But that is not analogous to a 2 group t-test comparing smoking between males and females.

        If you wanted to compare smoking among first-born twins to smoking among second-born twins, that would be a paired t-test and would be analogous to the two-group t-test of males vs females.

        So you need to be very clear what your question is before you can set about getting an answer.

        Comment


        • #5
          I am learning to do a twin design change over time study. Say I have 100 individuals that are 50 twin pairs. I want to model change over time in stress for the twin pairs and want to examine differences between twins in a multilevel setting. So I want to look at how all individuals change over time with a focus on twin differences for example twinA smokes twinB doesn't smoke. How can I assess this in a multilevel stata model?

          Comment


          • #6
            Originally posted by Clyde Schechter View Post
            I think you need to be clearer about what your question is. You can indeed determine if the variation of smoking within twin pairs exceeds the variation between them. The intraclass correlation is a measure of that. But that is not analogous to a 2 group t-test comparing smoking between males and females.

            If you wanted to compare smoking among first-born twins to smoking among second-born twins, that would be a paired t-test and would be analogous to the two-group t-test of males vs females.

            So you need to be very clear what your question is before you can set about getting an answer.
            I have taken much time to think about this and have read much literature. So here is what I want to examine:

            Say I have a twin pair of twin A and twin B. They achieved different levels of education. The outcome is stress. I want to use a method that utilizes the twin data to examine if twins who have different education have different stress. The idea is that the twins control for biology and family features. This helps answer if stress is linked to something at birth and if education is something that can help lead to lower stress. For example if twin A has a lot of education and lower stress but twin B has much less education and also very low stress I could hypothesize that stress is related to biological indicators. This is a simplified version of it but now I am wondering how to run this in stata. My idea is to do

            Code:
            xtset  twinpair
            regress stress education
            but I am unsure if this is sufficient or the type of model that is best. I also have less experience with intraclass correlation. Thank you for any advice.

            Comment


            • #7
              I think you're on the right track here. But the -regress- command fails to take account of the pairing among the twins. I think what you want is

              Code:
              xtset twinpair
              xtreg stress education, fe
              The use of -xtreg, fe- will allow you to specifically estimate the association between stress and education within twin pairs. Thus all aspects of biology (and those aspects of environment that are shared) are automatically adjusted for.

              Comment


              • #8
                I gather the issue can be tackled under some sort of hierarchical structure which "allows" repetead measures ("change of stress over time"), hence I think - mixed - as well as - xtgee - models might do the trick.
                Best regards,

                Marcos

                Comment


                • #9
                  Originally posted by Clyde Schechter View Post
                  I think you're on the right track here. But the -regress- command fails to take account of the pairing among the twins. I think what you want is

                  Code:
                  xtset twinpair
                  xtreg stress education, fe
                  The use of -xtreg, fe- will allow you to specifically estimate the association between stress and education within twin pairs. Thus all aspects of biology (and those aspects of environment that are shared) are automatically adjusted for.
                  This is excellent thank you. One further dimension I hope to add is following from the power twocorrelations Stata article (https://www.stata.com/manuals13/pssp...rrelations.pdf). They give an example "Or a genetics researcher may want to test the null hypothesis that the correlation of the cholesterol levels in identical twins raised together is equal to the correlation of the cholesterol levels in identical twins raised apart."

                  Say I wanted to test if the correlation of stress in twins raised together is equal to the correlation of stress in twins raised apart. My thought is to use mvtest correlations stress raisedtogether, by(ID).

                  raisedtogether takes on a value of 1 if they are raised together or 0 if they are not. Is this appropriate?

                  For this do I need to xtset twinpair? Also if this is correct then here is the result:

                  Code:
                  Test of equality of correlation matrices across samples
                  
                        Jennrich chi2(1) =      0.07
                             Prob > chi2 =    0.8981
                  Does this suggest there are actual differences which perhaps could imply that the families that raised them matter and not just biology? How can I determine how much of the variation in stress is due to biology versus environment?

                  Comment


                  • #10
                    I'm not familiar with the -mvtest- command, so I can't say.

                    If I were interested in testing whether the stress-education association differs between twins reared together and reared apart, my first thought would be:

                    Code:
                    xtreg stress i.raised_together##c.education, fe
                    margins raised_together, dydx(education) noestimcheck
                    The coefficient of the interaction term in the regression output would be the difference between the slope of stress on education among those raised together and among those raised apart. The actual slopes themselves would appear in the output of -margins-. Note that if you run this, Stata will omit the raised_together term from the model because it does not vary within twin pairs. That is not a problem; expect it and don't be disturbed by it.

                    If you are not familiar with the -margins- command, I think the best starting point is the excellent Richard Williams' https://www3.nd.edu/~rwilliam/stats/Margins01.pdf. It has several worked examples, including some that are similar to this exact situation.

                    All of that said, it may be that -mvtest correlations- will be another suitable approach; I just don't know.

                    Comment


                    • #11
                      his is amazing thank you so much. I have gotten the advice for my next analysis but have struggled for the past few weeks to code this into Stata and to interpret these results.

                      I want to examine smoking behavior in the sample that has twins raised apart and twins raised together. Now, I want to conduct a survival analysis with the following goal: I know if parents smoked in the household when the child was growing up. Say there is a twin pair raised apart. Twin A experienced smoking in the household when they were young but Twin B did not. Using the repeated measures data, I want to see if Twin A starts smoking before Twin B. However I am not sure of how to make excellent use of the available data given that it includes twins raised together and raised apart. Ultimately however the goal is to see if the smoking in the household has an influence on twins raised apart. I'm not sure how to do this and also am not sure how to use the twins raised together as controls. I believe I want to also look at intraclass correlations but could use some aiding in this approach.

                      Originally posted by Clyde Schechter View Post
                      I'm not familiar with the -mvtest- command, so I can't say.

                      If I were interested in testing whether the stress-education association differs between twins reared together and reared apart, my first thought would be:

                      Code:
                      xtreg stress i.raised_together##c.education, fe
                      margins raised_together, dydx(education) noestimcheck
                      The coefficient of the interaction term in the regression output would be the difference between the slope of stress on education among those raised together and among those raised apart. The actual slopes themselves would appear in the output of -margins-. Note that if you run this, Stata will omit the raised_together term from the model because it does not vary within twin pairs. That is not a problem; expect it and don't be disturbed by it.

                      If you are not familiar with the -margins- command, I think the best starting point is the excellent Richard Williams' https://www3.nd.edu/~rwilliam/stats/Margins01.pdf. It has several worked examples, including some that are similar to this exact situation.

                      All of that said, it may be that -mvtest correlations- will be another suitable approach; I just don't know.

                      Comment


                      • #12
                        In general terms, I'm not sure you're thinking about it the right way. If the twins are raised together, then both are experiencing the same household smoking environment. Therefore such twin pairs cannot provide any information about the effect of the household smoking environment, except perhaps on a between-twin-pairs (not within-twin-pairs) basis if twins raised together in smoking households take up smoking earlier than twins raised together in non-smoking households. The twins raised apart are, similarly uninformative except when one is raised in a smoking household and the other in a non-smoking household. So a within-twin-pairs analysis is going to be applicable only to the subsample with twins raised apart in discordant smoking environments. So I think you need to think of this in terms of both within- and between- comparisons. It is conceivable that there is an independent effect of being raised apart vs separately on smoking uptake, so including a term for that in the model seems to make sense, but I would be surprised if there is justification for an interaction term here. And, in general terms, you should not think of the this as defining treatment vs control groups. For the research question you are describing, it seems you will want to think of "smoking in the household" as the treatment vs control distinction.

                        -mestreg- should enable you to do what is needed. But you will need to select a suitable survival distribution for this. That raises some substantive questions on the epidemiology of smoking, and I don't know enough about that area to advise you. So I think you will need to consult with a local epidemiologist who has expertise in both survival analysis (most do) and the substantive epidemiology of smoking (that's a niche).

                        Comment


                        • #13
                          Originally posted by Clyde Schechter View Post
                          In general terms, I'm not sure you're thinking about it the right way. If the twins are raised together, then both are experiencing the same household smoking environment. Therefore such twin pairs cannot provide any information about the effect of the household smoking environment, except perhaps on a between-twin-pairs (not within-twin-pairs) basis if twins raised together in smoking households take up smoking earlier than twins raised together in non-smoking households. The twins raised apart are, similarly uninformative except when one is raised in a smoking household and the other in a non-smoking household. So a within-twin-pairs analysis is going to be applicable only to the subsample with twins raised apart in discordant smoking environments. So I think you need to think of this in terms of both within- and between- comparisons. It is conceivable that there is an independent effect of being raised apart vs separately on smoking uptake, so including a term for that in the model seems to make sense, but I would be surprised if there is justification for an interaction term here. And, in general terms, you should not think of the this as defining treatment vs control groups. For the research question you are describing, it seems you will want to think of "smoking in the household" as the treatment vs control distinction.

                          -mestreg- should enable you to do what is needed. But you will need to select a suitable survival distribution for this. That raises some substantive questions on the epidemiology of smoking, and I don't know enough about that area to advise you. So I think you will need to consult with a local epidemiologist who has expertise in both survival analysis (most do) and the substantive epidemiology of smoking (that's a niche).
                          Thank you very much for your reply. I will certainly look at mestreg and give this study much more thought.

                          Comment

                          Working...
                          X