Exercise

Whether a survey respondent agrees or disagrees with a conservative statement about the role of women in society

  • 1974/1975 Survey
  • Women should take care of running their homes and leave running the country up to men
  • Modeled as a function of the gender and years of education (0-20) of the respondents
  • Data from the HSAUR3 package
  • Observations are aggregate counts at education levels for men and women

Run a binomial logistic regression modeling the proportion of those who agreed - If you are more familiar with binary logistic regression, you may ‘unrole’ this data to be disagree-agree for each individual (the analysis is the same)

Now use brms or rstanarm to run the same analysis

Explore it fully by:

  • plotting the coefficients (stanplot)
  • use shinystan to explore diagnostics (launch_shinystan)
  • explore the posterior predictive distribtution (pp_check)
  • plot the marginal effect of the predictor variables (marginal_effects)