Announcement

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

  • Reporting of multiple coefficients from interaction with categorical variables

    Hello.

    First post here, so please bear with we if I do not comply with standard practice in here


    I am looking at how social class affects populist opinions, and how perceived class inequality interacts

    My variables:
    Y: Elitepop = Left-wing populist opinions (an index, 0-1)
    X: klasse2 = My class variable (from 1-5)
    Z: forskel = perceived class inequality (dummy, 0-1 - No - Yes)

    Control-variables:
    koen: Gender
    alder: Age


    My command: reg elitepop c.klasse2##i.forskel koen alder, r

    Since both class ("klasse2") and perceived class inequality ("forskel") are categorical, I've run the command with " i. "

    However, this presents me with an issue in regards to reporting the results in a table, since I'm getting an output with coefficients for each category (as opposed to when using i., then I'm only getting one)

    Can I avoid reporting all of the coefficients/can I get only one interaction coefficient (and not one for each class)? I'm only interested in knowing and reporting if there's an interaction, and which way it affects the effect of class on populist opinions. But I don't assume it's okay to just use c. in front of my x-variable, class (even though this would give me only one interaction coefficient)


    Thank you in advance! :-)

    I hope I gave all the relevant information, otherwise please let me know

    Kind regards
    Attached Files

  • #2
    Johanne:
    1) if you're investugating the interaction between two categorical variables, -i.var1##i.var2- is actually the way to go (unless the literature in your research field allows you to consider -klasse- as a continuous one, something that sounds implausible).
    2) to understand to which extent interaction affects (other thungs being equal) variation of the regressand, you can use -predict- and/or -margins-;
    3) as an aside, please do not post screenshots, but use CODE delimiters to share what you typed and what Stata gave you back (as per FAQ). Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X