Announcement

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

  • Predicted probabilities with a continuous x continuous interaction in a multilevel model

    Hello, everyone. I am currently working with cross-sectional survey data from seven countries, comprising 35,893 observations. My dependent variable is "satisfaction with democracy" (categorized into four categories), and my independent variable is "populism attitudes." Additionally, I am considering the moderating variable, "corruption levels."

    The model includes an interaction between an individual-level continuous predictor.

    I would like to calculate the marginal effects and predicted probabilities of populism attitudes and satisfaction with democracy based on different levels of corruption.

    However, I am facing challenges in finding the appropriate information on how to calculate a continuous-by-continuous interaction in a multilevel model.

    Here is my code.

    I hope these revisions help improve the clarity and readability of your text.


    Code:
            
    meologit  demo_satisfy c.Populism c.corruption///  
            c.Populism#c.corruption///
            $control ///
            || n_country:  ,  diff
    
    margins , dydx(Populism) at(corruption=(0.08(0.05)0.79)) expression(predict (outcome(4) mu fixed) + predict(outcome(3) mu fixed)) vsquish atmean
    # satisfaction with democracy is predicted by combining 3 (satisfied) and 4 (very satisfied)
    
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    Populism   |
             _at |
              1  |   .2285128   .0448994     5.09   0.000     .1405116     .316514
              2  |    .226162   .0380684     5.94   0.000     .1515493    .3007747
              3  |   .2232461   .0318626     7.01   0.000     .1607965    .2856957
              4  |   .2197591   .0263693     8.33   0.000     .1680763    .2714419
              5  |   .2156988   .0216909     9.94   0.000     .1731855    .2582121
              6  |   .2110671   .0179506    11.76   0.000     .1758845    .2462496
              7  |   .2058698   .0152808    13.47   0.000       .17592    .2358197
              8  |   .2001175   .0137635    14.54   0.000     .1731415    .2270934
              9  |   .1938246   .0133329    14.54   0.000     .1676925    .2199567
             10  |   .1870103   .0137537    13.60   0.000     .1600535     .213967
             11  |   .1796978   .0147392    12.19   0.000     .1508096     .208586
             12  |   .1719148   .0160741    10.70   0.000     .1404101    .2034195
             13  |   .1636927   .0176435     9.28   0.000     .1291121    .1982734
             14  |   .1550669   .0194036     7.99   0.000     .1170365    .1930973
             15  |   .1460762   .0213452     6.84   0.000     .1042402    .1879121
    ------------------------------------------------------------------------------
    I'm not sure "margins , dydx(Populism) at(corruption=(0.08(0.05)0.79)) expression(predict (outcome(4) mu fixed) + predict(outcome(3) mu fixed)) vsquish atmean" is predicted probabilities or marginal effects.

    I really tried to do this correctly, however I apologize if this is too wordy, too vague, or difficult to read. Thank you in advance.
    Last edited by Ian Oh; 27 Oct 2023, 02:13.
Working...
X