Announcement

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

  • Interpretation and reorganization of output from -contrast- statement

    Hello--
    I am interested in obtaining estimates from a contrast statement regarding an interaction term in a regression model. I am hoping for some guidance on the interpretation of the output and for suggestions on reorganizing the values for different output.

    I am hoping to estimate the different effects of current-season and prior-season vaccination on being an influenza case. Both of these vaccination variables are binary, and the outcome (having influenza) is also binary. A simplified version of my regression model is:
    Code:
    logistic influenza_case curr_sn_vax##prior_sn_vax


    After running this model, the contrast statement (in the following code) seems to provide effect estimates for:
    1) Current season vaccination + prior season no vaccine, compared to no vaccine in either season
    2) Current season vaccination + prior season vaccination, compared to no vaccine in either season
    Code:
    contrast current_season_vaccine@prior_season_vaccine, effects eform
    However, I wish to also know the effect of:
    3) Current season vaccination + prior season vaccination, compared to current season no vaccine + prior season vaccination

    Put another way, I wish to know the effect of:
    [curr_sn_vax = 1, prior_sn_vax = 1] compared to [curr_sn_vax = 0, prior_sn_vax = 1]

    I am not sure how to change the 'reference' category in the contrast statement to obtain this estimate. I am wondering if this may be possible through the use of margins or lincom, but as I am interested in the exponentiated log odds (and exponentiated log(OR)), I am not sure how best to manipulate the output from these commands to obtain what I want.

    Any advice would be helpful, even if the answer is obvious to others.

    (Edited to add: I am interested in both the exponentiated log odds & exponentiated log odds ratios.)

    Last edited by Maria Sundaram; 14 Jun 2022, 12:37.

  • #2
    So you are looking to contrast the two levels of curr_sn_vax within prior_sn_vax = 1. The simplest way is probably:
    Code:
    contrast r.curr_sn_vax@prior_sn_vax, effects eform
    It will also give you the contrast of the two levels of curr_sn_vax within prior_sn_vax = 0, but you can just ignore that part of the output.

    Comment


    • #3
      Thank you so much for this suggestion--this is indeed what I was looking for. I know the fix was simple, but it was very helpful to have this advice and has given me an opportunity to explore -contrast- a bit more. Thanks.

      Comment


      • #4
        Hi again--sorry to be a bit slow on the uptake, but I have a follow-up question. I realized after your comment that I may not be calculating
        [current season vaccination + prior season vaccination, compared to no vaccination in either season]
        correctly.

        Is this calculated by
        Code:
        contrast curr_sn_vax#prior_sn_vax, effects eform
        rather than what I wrote in my first post (using @ instead of # for this effect)?

        (Edited variable names referenced in code segment for consistency to previous posts)
        Last edited by Maria Sundaram; 14 Jun 2022, 16:16.

        Comment


        • #5
          current season vaccination + prior season vaccination, compared to no vaccination in either season is very different from what you asked about in #1. Assuming that 0 is the reference category for both current and prior season vaccination variables, the easiest way to get this odds ratio is straight from the regression output if your regression output gives odds ratios. If your regression output gives coefficients, then you can get it most easily with:
          Code:
          lincom 1.curr_sn_vax#1.prior_sn_vax, eform
          Also, in #4 you are now referring to variables named curr_any and prior_any which were not involved in your previous posts on this. I'm not sure what to make of that.

          Comment


          • #6
            Thanks very much, Clyde, and my apologies for the inconsistencies in variable names (I will edit the previous post for consistency). This is really helpful and I appreciate your guidance.

            Comment

            Working...
            X