Announcement

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

  • Which kind of method should I use for modifier?

    Dear all,

    Recently I analyzed the relationship between psychological distress and EBV (Epstein-Bar virus), now I would like to detect the effect of education in this relationship. Which kind of method is recommended to check the effect of education in the relationship between psychological distress and EBV?

    Look forward to your reply!

    Best regards,
    Raoping

  • #2
    Welcome to the Stata Forum / Statalist.

    I fear your question is somewhat uniformative (at least to me).

    In fact, you have not mentioned the patterns of the variables, the sample size, the sampling method, etc., yet you wish a very precise answer.

    Please read the FAQ, particularly the topic about queries with informative content.

    That said, sharing data (even a mock or toy example) is the best approach. You can use - dataex - or CODE delimiters for that matter.

    To end,here it goes an overarching answer concerning the recomended method: some sort of regression analysis will probably be among the options.
    Best regards,

    Marcos

    Comment


    • #3
      Originally posted by Marcos Almeida View Post
      Welcome to the Stata Forum / Statalist.

      I fear your question is somewhat uniformative (at least to me).

      In fact, you have not mentioned the patterns of the variables, the sample size, the sampling method, etc., yet you wish a very precise answer.

      Please read the FAQ, particularly the topic about queries with informative content.

      That said, sharing data (even a mock or toy example) is the best approach. You can use - dataex - or CODE delimiters for that matter.

      To end,here it goes an overarching answer concerning the recomended method: some sort of regression analysis will probably be among the options.
      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input float EBV byte psychological byte education
      -.0087739155 1 1
         -.4685211 4 0
          .4183013 3 2
          .7535831 1 0
         .39269695 3 2
      end
      The above is my example. Thank you for the instructions!

      Comment


      • #4
        Thank you for sharing an example of the data. I don’t know why EPV has negative values. That said, assuming it is the dependent variable, you may type - regress EPV i.psychological##i.education - if you wish to test for interaction. By the way, you may use - margins - and - marginsplot - to have a visual display of it. Hopefully that helps.
        Best regards,

        Marcos

        Comment


        • #5
          Originally posted by Marcos Almeida View Post
          Thank you for sharing an example of the data. I don’t know why EPV has negative values. That said, assuming it is the dependent variable, you may type - regress EPV i.psychological##i.education - if you wish to test for interaction. By the way, you may use - margins - and - marginsplot - to have a visual display of it. Hopefully that helps.
          Many thanks for your kindly explanation! As EBV is not normal distribution, so I use logEBV. I am still have following questions: 1. I am also confusing if I should use log(EBV) or log10(EBV)? 2.Type-
          regress EBV i.psychological##i.education-or-regress EBV i.psychological i.education i.psychological##i.education, which one is correct?
          3. I got following result, but I don't know what is "psychological #education" reference group?
          Or how to check whether it has interaction effect? Is it positive or negative?
          . reg lnebv i.psycholoical i.education i.psychological##i.education sex age

          Source SS df MS Number of obs = 2045
          F( 9, 635) = 3.81
          Model 7.32259746 9 .81362194 Prob > F = 0.0001
          Residual 135.735616 635 .213756876 R-squared = 0.0512
          Adj R-squared = 0.0377
          Total 143.058214 644 .222140084 Root MSE = .46234


          lnebv Coef. Std. Err. t P>t [95% Conf. Interval]

          psychological
          2 .012737 .0645543 0.20 0.844 -.1140287 .1395026
          3 .1694288 .0808681 2.10 0.037 .0106277 .32823
          4 .3357292 .1704268 1.97 0.049 .001061 .6703975

          2.education .2084324 .0699233 2.98 0.003 .0711235 .3457413

          psychological #education
          2 2 -.0539705 .0885099 -0.61 0.542 -.227778 .1198369
          3 2 -.1925343 .1031938 -1.87 0.063 -.3951766 .010108
          4 2 -.2742486 .2133763 -1.29 0.199 -.6932572 .1447599

          sex .1031165 .0389306 2.65 0.008 .0266683 .1795647
          age -.0151748 .01694 -0.90 0.371 -.04844 .0180905
          _cons 2.397347 .0906598 26.44 0.000 2.219318 2.575377


          Thank you again!

          Best regards,
          Raoping

          Comment


          • #6
            Please do read the FAQ. I am saying it again on account of the fact that you shared output that is not according to the FAQ advice. The way you posted the output makes it difficult to read.

            I fear some of your queries relate to the basic approach in Stata. Also, I fear some of them relate to the basic approach in stats.

            I'll try to give a short reply to a couple of the doubts I "fished" amongst text and unformatted output.

            First, the use of ## indicates Stata selected the so-called "main effects" as well as the interaction term. In other words, you have it all. You don't need to type the predictors once more.

            Second, since you have negative values and you said to be "confused" about with logarithm to select, I strongly recommend to check what happens to logarithms of negatives values before even thinking about jumping on this wagon.

            I believe there is not enough information to discuss about the appropriate method of analysis but, considering the report so far shared, you may search the Stata Manual as well as the Internet for generalized linear models.

            Please keep in mind that the core-knowledge related to "standard" OLS linear regression shall be grasped before going further.

            Hopefully that helps.
            Best regards,

            Marcos

            Comment


            • #7
              Originally posted by Marcos Almeida View Post
              Please do read the FAQ. I am saying it again on account of the fact that you shared output that is not according to the FAQ advice. The way you posted the output makes it difficult to read.

              I fear some of your queries relate to the basic approach in Stata. Also, I fear some of them relate to the basic approach in stats.

              I'll try to give a short reply to a couple of the doubts I "fished" amongst text and unformatted output.

              First, the use of ## indicates Stata selected the so-called "main effects" as well as the interaction term. In other words, you have it all. You don't need to type the predictors once more.

              Second, since you have negative values and you said to be "confused" about with logarithm to select, I strongly recommend to check what happens to logarithms of negatives values before even thinking about jumping on this wagon.

              I believe there is not enough information to discuss about the appropriate method of analysis but, considering the report so far shared, you may search the Stata Manual as well as the Internet for generalized linear models.

              Please keep in mind that the core-knowledge related to "standard" OLS linear regression shall be grasped before going further.

              Hopefully that helps.
              Noted with thanks!

              Best regards,
              Raoping

              Comment

              Working...
              X