Family SES, mediators, unobserved ability, and adult SES

bayesian-social-statistics-python · updated 3 days ago
QR code for framework.pub/go/h87x

framework.pub/go/h87x

Scan the code, or type the address. At framework.pub/go, enter h87x.

Download PNG Download SVG
Download JSON
Parents' ability (unobserved) Child's ability (unobserved) Motivation (10th grade) Family SES (2002) Math score (10th grade) Educational attainment Adult SES (2012) Race and ethnicity Sex
Exposure Outcome Latent

Adjustment sets

Minimal sufficient adjustment sets for the total effect of Family SES (2002) on Adult SES (2012).

No set of observed variables identifies the effect.

Code

DAGitty
dag {
  parent_ability [latent, pos="0,-3"]
  child_ability [latent, pos="1.5,-3"]
  motivation [pos="2.6,-2.4"]
  parent_ses [exposure, pos="0,0"]
  math [pos="1.5,-0.7"]
  attainment [pos="1.5,0.8"]
  adult_ses [outcome, pos="3.4,0"]
  race [pos="0,2.2"]
  sex [pos="2.4,2.2"]
  parent_ability -> parent_ses
  parent_ability -> child_ability
  parent_ses -> child_ability
  parent_ses -> motivation
  child_ability -> motivation
  child_ability -> math
  child_ability -> adult_ses
  motivation -> math
  motivation -> attainment
  motivation -> adult_ses
  sex -> motivation
  sex -> attainment
  sex -> adult_ses
  race -> parent_ses
  race -> adult_ses
  parent_ses -> adult_ses
  parent_ses -> math -> adult_ses
  parent_ses -> attainment -> adult_ses
  math -> attainment
}
Python
dag_complex = """dag {
  parent_ability [latent, pos="0,-3"]
  child_ability [latent, pos="1.5,-3"]
  motivation [pos="2.6,-2.4"]
  parent_ses [exposure, pos="0,0"]
  math [pos="1.5,-0.7"]
  attainment [pos="1.5,0.8"]
  adult_ses [outcome, pos="3.4,0"]
  race [pos="0,2.2"]
  sex [pos="2.4,2.2"]
  parent_ability -> parent_ses
  parent_ability -> child_ability
  parent_ses -> child_ability
  parent_ses -> motivation
  child_ability -> motivation
  child_ability -> math
  child_ability -> adult_ses
  motivation -> math
  motivation -> attainment
  motivation -> adult_ses
  sex -> motivation
  sex -> attainment
  sex -> adult_ses
  race -> parent_ses
  race -> adult_ses
  parent_ses -> adult_ses
  parent_ses -> math -> adult_ses
  parent_ses -> attainment -> adult_ses
  math -> attainment
}"""