Announcement

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

  • Adjusted Variables (Anova)

    Hello Respected Seniors,

    Hope you all are doing great. I have one question i am not understanding the concept and queries to run on stata.

    I have one randomized controlled data which has 4 arms and outcome is in length or weight difference. I have reported unadjusted data to my boss he is asking me to show adjusted model for specific variables like age, gender of the child, BMI, etc. For unadjusted I have used anova for mean pairwise comparison, I have used over arm mcompare (tukey) effects and then showed Proportion difference (95%). Now how to do it same thing with adjusted variables? Can any one share queries please?

  • #2
    Zaroom:
    welcome to ths forum.
    Your boss is probably asking you to switch from -anova- to -regress-, that can do everythng -anova- can do much better.
    As an aside, I'd investigate possibe nonlinearities between -age- and the dependent variable via adding in the right-hand side of your regression equation:
    Code:
    c.age##c.age
    Assuming that your interested in weight difference:
    Code:
    regress weight c.age##c.age bmi i.gender i.RCT_groups
    If you want to perform the regression on both dependent variables at the same time, take a look at -mvreg-.

    In your future posts, please follow the FAQ and share what you typed and what Stata gave you back. Thanks.
    Last edited by Carlo Lazzaro; 01 Dec 2022, 05:49.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Zaroom:
      welcome to ths forum.
      Your boss is probably asking you to switch from -anova- to -regress-, that can do everythng -anova- can do much better.
      As an aside, I'd investigate possibe nonlinearities between -age- and the dependent variable via adding in the right-hand side of your regression equation:
      Code:
      c.age##c.age
      Assuming that your interested in weight difference:
      Code:
      regress weight c.age##c.age bmi i.gender i.RCT_groups
      If you want to perform the regression on both dependent variables at the same time, take a look at -mvreg-.

      In your future posts, please follow the FAQ and share what you typed and what Stata gave you back. Thanks.
      Thank you so much for quick response let me try and revert.
      yes i will be careful before posting

      Comment


      • #4
        After regression I need to report mean difference across the groups and group comparison between different groups. How to do that?

        Comment


        • #5
          This is the output and i used the command is it right? and why we are using c.m_age##c.m_age (age##age again?).And after that if i wanted to use margin how to use that for mean differences?

          regress c_weight c.m_age##c.m_age m_bmi i.gender i.arm

          Source | SS df MS Number of obs = 1,678
          -------------+---------------------------------- F(7, 1670) = 15.84
          Model | 23425516.8 7 3346502.39 Prob > F = 0.0000
          Residual | 352789530 1,670 211251.216 R-squared = 0.0623
          -------------+---------------------------------- Adj R-squared = 0.0583
          Total | 376215047 1,677 224338.132 Root MSE = 459.62

          ---------------------------------------------------------------------------------
          c_weight | Coefficient Std. err. t P>|t| [95% conf. interval]
          ----------------+----------------------------------------------------------------
          m_age | 32.22501 16.49847 1.95 0.051 -.1348459 64.58486
          |
          c.m_age#c.m_age | -.4923989 .3040088 -1.62 0.105 -1.088677 .1038796
          |
          m_bmi | 21.90335 3.153082 6.95 0.000 15.71894 28.08776
          |
          gender |
          Female | -107.5871 22.50372 -4.78 0.000 -151.7256 -63.44863
          |
          arm |
          2 | 41.26297 32.03282 1.29 0.198 -21.56573 104.0917
          3 | 112.9026 31.78413 3.55 0.000 50.56165 175.2435
          4 | 71.54818 31.91167 2.24 0.025 8.957095 134.1393
          |
          _cons | 1863.133 222.0571 8.39 0.000 1427.594 2298.673
          ---------------------------------------------------------------------------------

          .

          Comment


          • #6
            Zaroom:
            are you comparing -c_weight- or -mean_c_weight- across the four groups?
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Zaroom:
              are you comparing -c_weight- or -mean_c_weight- across the four groups?
              i wanted to compare mean weights, but unable to do so

              Comment


              • #8
                Zaroom:
                1) your coefficients about -arms- are already adjusted for the remaining predictors;
                2) see -test- for comparisons.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X