Investigating SES measures in relation to number of children fathered

library(TwoSampleMR)
## TwoSampleMR version 0.5.6 
## [>] New: Option to use non-European LD reference panels for clumping etc
## [>] Some studies temporarily quarantined to verify effect allele
## [>] See news(package='TwoSampleMR') and https://gwas.mrcieu.ac.uk for further details

Degree

d <- make_dat("ukb-b-16489", "ukb-b-2227")
## API: public: http://gwas-api.mrcieu.ac.uk/
## Extracting data for 261 SNP(s) from 1 GWAS(s)
## Harmonising Qualifications: College or University degree || id:ukb-b-16489 (ukb-b-16489) and Number of children fathered || id:ukb-b-2227 (ukb-b-2227)
## Removing the following SNPs for incompatible alleles:
## rs2606913
d_mr<-mr(d)
## Analysing 'ukb-b-16489' on 'ukb-b-2227'
d_mr
##   id.exposure id.outcome                                      outcome
## 1 ukb-b-16489 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 2 ukb-b-16489 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 3 ukb-b-16489 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 4 ukb-b-16489 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 5 ukb-b-16489 ukb-b-2227 Number of children fathered || id:ukb-b-2227
##                                                         exposure
## 1 Qualifications: College or University degree || id:ukb-b-16489
## 2 Qualifications: College or University degree || id:ukb-b-16489
## 3 Qualifications: College or University degree || id:ukb-b-16489
## 4 Qualifications: College or University degree || id:ukb-b-16489
## 5 Qualifications: College or University degree || id:ukb-b-16489
##                      method nsnp          b         se         pval
## 1                  MR Egger  261 -0.4399526 0.12120401 3.416623e-04
## 2           Weighted median  261 -0.2604059 0.03884087 2.021947e-11
## 3 Inverse variance weighted  261 -0.2227341 0.02989581 9.309633e-14
## 4               Simple mode  261 -0.2652487 0.13184898 4.527670e-02
## 5             Weighted mode  261 -0.2913719 0.10248685 4.823636e-03
mr_scatter_plot(d_mr,d)
## $`ukb-b-16489.ukb-b-2227`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure id.outcome
## 1 ukb-b-16489 ukb-b-2227
d <- make_dat("ukb-b-2227", "ukb-b-16489")
## Extracting data for 3 SNP(s) from 1 GWAS(s)
## Harmonising Number of children fathered || id:ukb-b-2227 (ukb-b-2227) and Qualifications: College or University degree || id:ukb-b-16489 (ukb-b-16489)
d_mr<-mr(d)
## Analysing 'ukb-b-2227' on 'ukb-b-16489'
d_mr
##   id.exposure  id.outcome
## 1  ukb-b-2227 ukb-b-16489
## 2  ukb-b-2227 ukb-b-16489
## 3  ukb-b-2227 ukb-b-16489
## 4  ukb-b-2227 ukb-b-16489
## 5  ukb-b-2227 ukb-b-16489
##                                                          outcome
## 1 Qualifications: College or University degree || id:ukb-b-16489
## 2 Qualifications: College or University degree || id:ukb-b-16489
## 3 Qualifications: College or University degree || id:ukb-b-16489
## 4 Qualifications: College or University degree || id:ukb-b-16489
## 5 Qualifications: College or University degree || id:ukb-b-16489
##                                       exposure                    method nsnp
## 1 Number of children fathered || id:ukb-b-2227                  MR Egger    3
## 2 Number of children fathered || id:ukb-b-2227           Weighted median    3
## 3 Number of children fathered || id:ukb-b-2227 Inverse variance weighted    3
## 4 Number of children fathered || id:ukb-b-2227               Simple mode    3
## 5 Number of children fathered || id:ukb-b-2227             Weighted mode    3
##            b         se         pval
## 1 -1.3914338 0.57384024 2.490190e-01
## 2 -0.2685969 0.04827805 2.643570e-08
## 3 -0.2413022 0.04655722 2.184424e-07
## 4 -0.2765485 0.06681238 5.370852e-02
## 5 -0.2771196 0.05830042 4.152254e-02
mr_scatter_plot(d_mr,d)
## $`ukb-b-2227.ukb-b-16489`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure  id.outcome
## 1  ukb-b-2227 ukb-b-16489

Having a degree is very strongly negatively related to having children. However, there is also evidence of reverse causality or confounding.