Announcement

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

  • Plotting trends in relative and absolute inequalities using riigen and margins

    Hello,

    In a repeated cross-sectional designed study I would like to calculate the relative and absolute indexes of inequalities for education and test their associations with the prevalence of hypertension across survey periods. To do so I am using riigen to obtaing relative the index of inequality and then poisson and linear regressions for calculating relative (RII) and absolute (SII) inequalities followed by margins.

    Code:
    riigen edu, riiname("hyp") varprefix("RII_hyp")
        
    glm hypertension c.age i.gender c.RII_hyp_edu##i.survey, fam(poisson) link(log) eform vce(robust)
    margins, at(survey=(1(1)3)) expression(exp(predict())) saving(RII, replace) vce(uncond)        
    
    regress hypertension c.age i.gender c.RII_hyp_edu##i.survey, robust
    margins, at(survey=(1(1)3)) saving(SII, replace) vce(uncond)
    
    combomarginsplot RII SII, labels("RII" "SII")
    I am wondering if it is the right approach to include the interaction term between the index of inequality and survey period to then plot the results in a graph and showing the trend.

    Giovanni

  • #2
    Hi, I'm currently in a similar situation and wondering if there was an update you could provide on this?

    Comment

    Working...
    X