SOCI 620: Quantitative methods 2

Agenda

Linear regression as a probability model

  1. Administrative
  2. Linear regresion with
    one covariate
  3. Joint posteriors
  4. Interpretation of log-
    scale coefficients
  5. Hands on:
    Working with posterior
    samples in R

Slides are licensed under CC BY-NC-SA 4.0

Uploading to generative AI tools or use for training machine learning models is prohibited

Administrative

Labs with TA

  • Still waiting on administrative response for move to Leacock

Worksheet

  • Check in
  • Due this Thursday, Sept 17 by midnight
  • Peer assessments due by Tuesday, Sept 22

Regression with binary covariate

'two paths' meme. Illustration of a person standing at a split in a road. One path leads to a sunny, pleasant looking castle, while the other leads to a foreboding, stormy and desolate castle.

Modeling income by sex

Note:
Canadian Income Survey (CIS) uses the Labour Force Survey (LFS) sex variable, which asks respondents for their sex “assigned at birth” and requires respondents to answer either “male” or “female.” While the LFS includes a gender item, this is not available in the CIS.

Modeling income by sex

Model from last week:

Entire population has one mean and one standard deviation

Modeling income by sex

Regression:

Standard linear regression allows mean to vary depending on respondent

Modeling income by sex

Regression:

Standard linear regression allows mean to vary depending on respondent

Modeling income by sex

Regression:

Standard linear regression allows mean to vary depending on respondent

Modeling income by sex

Regression:

Standard linear regression allows mean to vary depending on respondent

Modeling income by sex

No predictors

One predictor

Alternate expressions

Same model, three* representations:

* at least three

Joint posterior distributions

The cover art for New Order's 'Unknown Pleasures' album, showing a series of white lines forming a rugged landscape on a black background.

Joint posterior

When we estimate this model, we get a single joint posterior distribution for all three parameters:

What can we do with a joint posterior?

Joint posterior

Data:
Sample of 3,181 working
adults in Canada

  1. Describe the marginal posterior distributions


Mean
Std. dev
2.5%

97.5%

10.46 0.02 10.42 10.51

0.21 0.03 0.15 0.27

0.85 0.01 0.83 0.87

Joint posterior

Data:
Sample of 3,181 working
adults in Canada

  1. Describe the marginal posterior distributions
  1. Describe posterior probability of theoretically relevant scenarios

Joint posterior

Data:
Sample of 3,181 working
adults in Canada

  1. Describe the marginal posterior distributions

  2. Describe posterior probability of theoretically relevant scenarios

  1. Describe the ‘partial’ joint posterior distribution

Log-scale coefficients


Mean
Std. dev
2.5%

97.5%

10.46 0.02 10.42 10.51

0.21 0.03 0.15 0.27

0.85 0.01 0.83 0.87

In general: if the outcome variable is on a log-scale, then exponentiating coefficient estimates () gives multiplicative factors


These results suggest that men make about 22.3% more than women on average

Adding covariates

From here, we can add covariates to model income however we like

Compact notation:

Image credit

Figures by Peter McMahan (source code)

"Distributional models" allow varying sigma

"Distributional models" allow varying sigma

"Distributional models" allow varying sigma

"Distributional models" allow varying sigma