Investigating SES measures in relation to number of live births
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
d <- make_dat("ukb-b-10011", "ukb-b-1209")
## API: public: http://gwas-api.mrcieu.ac.uk/
## Extracting data for 18 SNP(s) from 1 GWAS(s)
## Harmonising Townsend deprivation index at recruitment || id:ukb-b-10011 (ukb-b-10011) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
d_mr<-mr(d)
## Analysing 'ukb-b-10011' on 'ukb-b-1209'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-10011 ukb-b-1209 Number of live births || id:ukb-b-1209
## 2 ukb-b-10011 ukb-b-1209 Number of live births || id:ukb-b-1209
## 3 ukb-b-10011 ukb-b-1209 Number of live births || id:ukb-b-1209
## 4 ukb-b-10011 ukb-b-1209 Number of live births || id:ukb-b-1209
## 5 ukb-b-10011 ukb-b-1209 Number of live births || id:ukb-b-1209
## exposure
## 1 Townsend deprivation index at recruitment || id:ukb-b-10011
## 2 Townsend deprivation index at recruitment || id:ukb-b-10011
## 3 Townsend deprivation index at recruitment || id:ukb-b-10011
## 4 Townsend deprivation index at recruitment || id:ukb-b-10011
## 5 Townsend deprivation index at recruitment || id:ukb-b-10011
## method nsnp b se pval
## 1 MR Egger 18 -0.721029470 0.51558680 0.1810573
## 2 Weighted median 18 -0.010447229 0.09751978 0.9146864
## 3 Inverse variance weighted 18 -0.016571429 0.08772933 0.8501769
## 4 Simple mode 18 0.054398021 0.20243979 0.7913850
## 5 Weighted mode 18 -0.005075999 0.19334690 0.9793610
mr_scatter_plot(d_mr,d)
## $`ukb-b-10011.ukb-b-1209`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-10011 ukb-b-1209
d <- make_dat("ukb-b-1209", "ukb-b-10011")
## Extracting data for 11 SNP(s) from 1 GWAS(s)
## Harmonising Number of live births || id:ukb-b-1209 (ukb-b-1209) and Townsend deprivation index at recruitment || id:ukb-b-10011 (ukb-b-10011)
d_mr<-mr(d)
## Analysing 'ukb-b-1209' on 'ukb-b-10011'
d_mr
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-10011
## 2 ukb-b-1209 ukb-b-10011
## 3 ukb-b-1209 ukb-b-10011
## 4 ukb-b-1209 ukb-b-10011
## 5 ukb-b-1209 ukb-b-10011
## outcome
## 1 Townsend deprivation index at recruitment || id:ukb-b-10011
## 2 Townsend deprivation index at recruitment || id:ukb-b-10011
## 3 Townsend deprivation index at recruitment || id:ukb-b-10011
## 4 Townsend deprivation index at recruitment || id:ukb-b-10011
## 5 Townsend deprivation index at recruitment || id:ukb-b-10011
## exposure method nsnp
## 1 Number of live births || id:ukb-b-1209 MR Egger 11
## 2 Number of live births || id:ukb-b-1209 Weighted median 11
## 3 Number of live births || id:ukb-b-1209 Inverse variance weighted 11
## 4 Number of live births || id:ukb-b-1209 Simple mode 11
## 5 Number of live births || id:ukb-b-1209 Weighted mode 11
## b se pval
## 1 0.22149362 0.34676292 0.53890107
## 2 0.06449532 0.04159249 0.12098599
## 3 0.05193520 0.04016090 0.19594946
## 4 0.11014630 0.06751455 0.13384826
## 5 0.12194845 0.06711021 0.09923975
mr_scatter_plot(d_mr,d)
## $`ukb-b-1209.ukb-b-10011`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-10011
No causal relationship, did not appear in list of traits from rms2.
d <- make_dat("ukb-b-7408", "ukb-b-1209")
## Extracting data for 48 SNP(s) from 1 GWAS(s)
## Harmonising Average total household income before tax || id:ukb-b-7408 (ukb-b-7408) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for incompatible alleles:
## rs1239705
d_mr<-mr(d)
## Analysing 'ukb-b-7408' on 'ukb-b-1209'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-7408 ukb-b-1209 Number of live births || id:ukb-b-1209
## 2 ukb-b-7408 ukb-b-1209 Number of live births || id:ukb-b-1209
## 3 ukb-b-7408 ukb-b-1209 Number of live births || id:ukb-b-1209
## 4 ukb-b-7408 ukb-b-1209 Number of live births || id:ukb-b-1209
## 5 ukb-b-7408 ukb-b-1209 Number of live births || id:ukb-b-1209
## exposure
## 1 Average total household income before tax || id:ukb-b-7408
## 2 Average total household income before tax || id:ukb-b-7408
## 3 Average total household income before tax || id:ukb-b-7408
## 4 Average total household income before tax || id:ukb-b-7408
## 5 Average total household income before tax || id:ukb-b-7408
## method nsnp b se pval
## 1 MR Egger 48 -0.3765411 0.17805804 3.990355e-02
## 2 Weighted median 48 -0.2503889 0.04255539 4.008648e-09
## 3 Inverse variance weighted 48 -0.2055081 0.04169978 8.295737e-07
## 4 Simple mode 48 -0.3205576 0.11003527 5.459567e-03
## 5 Weighted mode 48 -0.3330125 0.09781342 1.364742e-03
mr_scatter_plot(d_mr,d)
## $`ukb-b-7408.ukb-b-1209`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-7408 ukb-b-1209
d <- make_dat("ukb-b-1209", "ukb-b-7408")
## Extracting data for 11 SNP(s) from 1 GWAS(s)
## Harmonising Number of live births || id:ukb-b-1209 (ukb-b-1209) and Average total household income before tax || id:ukb-b-7408 (ukb-b-7408)
d_mr<-mr(d)
## Analysing 'ukb-b-1209' on 'ukb-b-7408'
d_mr
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-7408
## 2 ukb-b-1209 ukb-b-7408
## 3 ukb-b-1209 ukb-b-7408
## 4 ukb-b-1209 ukb-b-7408
## 5 ukb-b-1209 ukb-b-7408
## outcome
## 1 Average total household income before tax || id:ukb-b-7408
## 2 Average total household income before tax || id:ukb-b-7408
## 3 Average total household income before tax || id:ukb-b-7408
## 4 Average total household income before tax || id:ukb-b-7408
## 5 Average total household income before tax || id:ukb-b-7408
## exposure method nsnp
## 1 Number of live births || id:ukb-b-1209 MR Egger 11
## 2 Number of live births || id:ukb-b-1209 Weighted median 11
## 3 Number of live births || id:ukb-b-1209 Inverse variance weighted 11
## 4 Number of live births || id:ukb-b-1209 Simple mode 11
## 5 Number of live births || id:ukb-b-1209 Weighted mode 11
## b se pval
## 1 -0.9823713 0.89375170 0.30023211
## 2 -0.1513280 0.06450052 0.01896835
## 3 -0.2506977 0.10591321 0.01793243
## 4 -0.1434908 0.09812880 0.17437155
## 5 -0.1291129 0.08199783 0.14642839
mr_scatter_plot(d_mr,d)
## $`ukb-b-1209.ukb-b-7408`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-7408
Appears to be a causal relationship.
d <- make_dat("ieu-a-1239", "ukb-b-1209")
## Extracting data for 317 SNP(s) from 1 GWAS(s)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for incompatible alleles:
## rs510706
d_mr<-mr(d)
## Analysing 'ieu-a-1239' on 'ukb-b-1209'
d_mr
## id.exposure id.outcome outcome
## 1 ieu-a-1239 ukb-b-1209 Number of live births || id:ukb-b-1209
## 2 ieu-a-1239 ukb-b-1209 Number of live births || id:ukb-b-1209
## 3 ieu-a-1239 ukb-b-1209 Number of live births || id:ukb-b-1209
## 4 ieu-a-1239 ukb-b-1209 Number of live births || id:ukb-b-1209
## 5 ieu-a-1239 ukb-b-1209 Number of live births || id:ukb-b-1209
## exposure method nsnp b
## 1 Years of schooling || id:ieu-a-1239 MR Egger 317 -0.2234196
## 2 Years of schooling || id:ieu-a-1239 Weighted median 317 -0.2254122
## 3 Years of schooling || id:ieu-a-1239 Inverse variance weighted 317 -0.2359302
## 4 Years of schooling || id:ieu-a-1239 Simple mode 317 -0.2514514
## 5 Years of schooling || id:ieu-a-1239 Weighted mode 317 -0.2896279
## se pval
## 1 0.08237401 7.049753e-03
## 2 0.02624929 8.898843e-18
## 3 0.02069064 4.051294e-30
## 4 0.09864604 1.127476e-02
## 5 0.08981364 1.392629e-03
mr_scatter_plot(d_mr,d)
## $`ieu-a-1239.ukb-b-1209`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ieu-a-1239 ukb-b-1209
d <- make_dat("ukb-b-1209", "ieu-a-1239")
## Extracting data for 11 SNP(s) from 1 GWAS(s)
## Finding proxies for 1 SNPs in outcome ieu-a-1239
## Extracting data for 1 SNP(s) from 1 GWAS(s)
## Harmonising Number of live births || id:ukb-b-1209 (ukb-b-1209) and Years of schooling || id:ieu-a-1239 (ieu-a-1239)
d_mr<-mr(d)
## Analysing 'ukb-b-1209' on 'ieu-a-1239'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-1209 ieu-a-1239 Years of schooling || id:ieu-a-1239
## 2 ukb-b-1209 ieu-a-1239 Years of schooling || id:ieu-a-1239
## 3 ukb-b-1209 ieu-a-1239 Years of schooling || id:ieu-a-1239
## 4 ukb-b-1209 ieu-a-1239 Years of schooling || id:ieu-a-1239
## 5 ukb-b-1209 ieu-a-1239 Years of schooling || id:ieu-a-1239
## exposure method nsnp
## 1 Number of live births || id:ukb-b-1209 MR Egger 11
## 2 Number of live births || id:ukb-b-1209 Weighted median 11
## 3 Number of live births || id:ukb-b-1209 Inverse variance weighted 11
## 4 Number of live births || id:ukb-b-1209 Simple mode 11
## 5 Number of live births || id:ukb-b-1209 Weighted mode 11
## b se pval
## 1 -0.30349638 0.93538911 0.753003952
## 2 -0.13733311 0.04509934 0.002325838
## 3 -0.30570512 0.10780701 0.004572964
## 4 -0.08627129 0.05269419 0.132628798
## 5 -0.08627129 0.04760969 0.100066612
mr_scatter_plot(d_mr,d)
## $`ukb-b-1209.ieu-a-1239`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-1209 ieu-a-1239
Appears to be a causal realtionship.
d <- mv_extract_exposures(c("ieu-a-1239", "ukb-b-7408"))
## Please look at vignettes for options on running this locally if you need to run many instances of this command.
## Clumping 1, 362 variants, using EUR population reference
## Removing 50 of 362 variants due to LD with other variants or absence from LD reference panel
## Extracting data for 312 SNP(s) from 2 GWAS(s)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Average total household income before tax || id:ukb-b-7408 (ukb-b-7408)
## Removing the following SNPs for incompatible alleles:
## rs510706
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs12134151, rs13130765, rs1455350, rs2414072, rs2478208, rs2545798, rs320693, rs401687, rs60483752, rs6867851, rs7920624
o <- extract_outcome_data(d$SNP, "ukb-b-1209")
## Extracting data for 311 SNP(s) from 1 GWAS(s)
d <- mv_harmonise_data(d, o)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs12134151, rs13130765, rs1455350, rs2414072, rs2478208, rs2545798, rs320693, rs401687, rs60483752, rs6867851, rs7920624
mv_multiple(d)
## $result
## id.exposure exposure
## 1 ieu-a-1239 Years of schooling || id:ieu-a-1239
## 2 ukb-b-7408 Average total household income before tax || id:ukb-b-7408
## id.outcome outcome nsnp b se
## 1 ukb-b-1209 Number of live births || id:ukb-b-1209 297 -0.21062454 0.04801625
## 2 ukb-b-1209 Number of live births || id:ukb-b-1209 22 -0.03493798 0.06469154
## pval
## 1 1.151753e-05
## 2 5.891486e-01
Income attenuates. Income effect on number of children is mostly explained by years of schooling.
d <- make_dat("ukb-a-505", "ukb-b-1209")
## Extracting data for 22 SNP(s) from 1 GWAS(s)
## Harmonising Age completed full time education || id:ukb-a-505 (ukb-a-505) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
d_mr<-mr(d)
## Analysing 'ukb-a-505' on 'ukb-b-1209'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-a-505 ukb-b-1209 Number of live births || id:ukb-b-1209
## 2 ukb-a-505 ukb-b-1209 Number of live births || id:ukb-b-1209
## 3 ukb-a-505 ukb-b-1209 Number of live births || id:ukb-b-1209
## 4 ukb-a-505 ukb-b-1209 Number of live births || id:ukb-b-1209
## 5 ukb-a-505 ukb-b-1209 Number of live births || id:ukb-b-1209
## exposure method
## 1 Age completed full time education || id:ukb-a-505 MR Egger
## 2 Age completed full time education || id:ukb-a-505 Weighted median
## 3 Age completed full time education || id:ukb-a-505 Inverse variance weighted
## 4 Age completed full time education || id:ukb-a-505 Simple mode
## 5 Age completed full time education || id:ukb-a-505 Weighted mode
## nsnp b se pval
## 1 22 -0.03008744 0.33448441 0.92922035
## 2 22 -0.14473244 0.07439077 0.05170641
## 3 22 -0.16688043 0.07878500 0.03416025
## 4 22 -0.19008291 0.14344027 0.19935279
## 5 22 -0.18497872 0.13202317 0.17578707
mr_scatter_plot(d_mr,d)
## $`ukb-a-505.ukb-b-1209`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-a-505 ukb-b-1209
d <- make_dat("ukb-b-1209", "ukb-a-505")
## Extracting data for 11 SNP(s) from 1 GWAS(s)
## Harmonising Number of live births || id:ukb-b-1209 (ukb-b-1209) and Age completed full time education || id:ukb-a-505 (ukb-a-505)
d_mr<-mr(d)
## Analysing 'ukb-b-1209' on 'ukb-a-505'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-1209 ukb-a-505 Age completed full time education || id:ukb-a-505
## 2 ukb-b-1209 ukb-a-505 Age completed full time education || id:ukb-a-505
## 3 ukb-b-1209 ukb-a-505 Age completed full time education || id:ukb-a-505
## 4 ukb-b-1209 ukb-a-505 Age completed full time education || id:ukb-a-505
## 5 ukb-b-1209 ukb-a-505 Age completed full time education || id:ukb-a-505
## exposure method nsnp
## 1 Number of live births || id:ukb-b-1209 MR Egger 11
## 2 Number of live births || id:ukb-b-1209 Weighted median 11
## 3 Number of live births || id:ukb-b-1209 Inverse variance weighted 11
## 4 Number of live births || id:ukb-b-1209 Simple mode 11
## 5 Number of live births || id:ukb-b-1209 Weighted mode 11
## b se pval
## 1 0.3746617 0.45950285 0.4359101745
## 2 -0.1434986 0.04970444 0.0038888812
## 3 -0.2016832 0.05702172 0.0004047716
## 4 -0.1304440 0.07188799 0.0996605434
## 5 -0.1212869 0.07384215 0.1315139945
mr_scatter_plot(d_mr,d)
## $`ukb-b-1209.ukb-a-505`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-a-505
d <- make_dat("ukb-b-17729", "ukb-b-1209")
## Extracting data for 93 SNP(s) from 1 GWAS(s)
## Harmonising Qualifications: None of the above || id:ukb-b-17729 (ukb-b-17729) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
d_mr<-mr(d)
## Analysing 'ukb-b-17729' on 'ukb-b-1209'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-17729 ukb-b-1209 Number of live births || id:ukb-b-1209
## 2 ukb-b-17729 ukb-b-1209 Number of live births || id:ukb-b-1209
## 3 ukb-b-17729 ukb-b-1209 Number of live births || id:ukb-b-1209
## 4 ukb-b-17729 ukb-b-1209 Number of live births || id:ukb-b-1209
## 5 ukb-b-17729 ukb-b-1209 Number of live births || id:ukb-b-1209
## exposure method
## 1 Qualifications: None of the above || id:ukb-b-17729 MR Egger
## 2 Qualifications: None of the above || id:ukb-b-17729 Weighted median
## 3 Qualifications: None of the above || id:ukb-b-17729 Inverse variance weighted
## 4 Qualifications: None of the above || id:ukb-b-17729 Simple mode
## 5 Qualifications: None of the above || id:ukb-b-17729 Weighted mode
## nsnp b se pval
## 1 93 1.0775771 0.45134402 1.903231e-02
## 2 93 0.6455942 0.11147582 6.982772e-09
## 3 93 0.6767182 0.08936357 3.657109e-14
## 4 93 0.7534389 0.29934045 1.356689e-02
## 5 93 0.7789433 0.28813473 8.175030e-03
mr_scatter_plot(d_mr,d)
## $`ukb-b-17729.ukb-b-1209`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-17729 ukb-b-1209
d <- make_dat("ukb-b-1209", "ukb-b-17729")
## Extracting data for 11 SNP(s) from 1 GWAS(s)
## Server code: 502; Server is possibly experiencing traffic, trying again...
## Retry succeeded!
## Harmonising Number of live births || id:ukb-b-1209 (ukb-b-1209) and Qualifications: None of the above || id:ukb-b-17729 (ukb-b-17729)
d_mr<-mr(d)
## Analysing 'ukb-b-1209' on 'ukb-b-17729'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-1209 ukb-b-17729 Qualifications: None of the above || id:ukb-b-17729
## 2 ukb-b-1209 ukb-b-17729 Qualifications: None of the above || id:ukb-b-17729
## 3 ukb-b-1209 ukb-b-17729 Qualifications: None of the above || id:ukb-b-17729
## 4 ukb-b-1209 ukb-b-17729 Qualifications: None of the above || id:ukb-b-17729
## 5 ukb-b-1209 ukb-b-17729 Qualifications: None of the above || id:ukb-b-17729
## exposure method nsnp
## 1 Number of live births || id:ukb-b-1209 MR Egger 11
## 2 Number of live births || id:ukb-b-1209 Weighted median 11
## 3 Number of live births || id:ukb-b-1209 Inverse variance weighted 11
## 4 Number of live births || id:ukb-b-1209 Simple mode 11
## 5 Number of live births || id:ukb-b-1209 Weighted mode 11
## b se pval
## 1 -0.10777732 0.24354301 0.6685435095
## 2 0.06658624 0.01901508 0.0004621962
## 3 0.08198233 0.02876938 0.0043768979
## 4 0.08706764 0.03699245 0.0403877382
## 5 0.08947944 0.03876605 0.0436416241
mr_scatter_plot(d_mr,d)
## $`ukb-b-1209.ukb-b-17729`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-17729
d <- make_dat("ukb-b-11615", "ukb-b-1209")
## Extracting data for 88 SNP(s) from 1 GWAS(s)
## Harmonising Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615 (ukb-b-11615) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
d_mr<-mr(d)
## Analysing 'ukb-b-11615' on 'ukb-b-1209'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-11615 ukb-b-1209 Number of live births || id:ukb-b-1209
## 2 ukb-b-11615 ukb-b-1209 Number of live births || id:ukb-b-1209
## 3 ukb-b-11615 ukb-b-1209 Number of live births || id:ukb-b-1209
## 4 ukb-b-11615 ukb-b-1209 Number of live births || id:ukb-b-1209
## 5 ukb-b-11615 ukb-b-1209 Number of live births || id:ukb-b-1209
## exposure
## 1 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 2 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 3 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 4 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 5 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## method nsnp b se pval
## 1 MR Egger 88 -0.6236531 0.47130188 1.892575e-01
## 2 Weighted median 88 -0.5614634 0.09442271 2.743130e-09
## 3 Inverse variance weighted 88 -0.5697912 0.08478354 1.810517e-11
## 4 Simple mode 88 -0.4475777 0.25427568 8.188739e-02
## 5 Weighted mode 88 -0.4143215 0.28377380 1.478804e-01
mr_scatter_plot(d_mr,d)
## $`ukb-b-11615.ukb-b-1209`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-11615 ukb-b-1209
d <- make_dat("ukb-b-1209", "ukb-b-11615")
## Extracting data for 11 SNP(s) from 1 GWAS(s)
## Harmonising Number of live births || id:ukb-b-1209 (ukb-b-1209) and Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615 (ukb-b-11615)
d_mr<-mr(d)
## Analysing 'ukb-b-1209' on 'ukb-b-11615'
d_mr
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-11615
## 2 ukb-b-1209 ukb-b-11615
## 3 ukb-b-1209 ukb-b-11615
## 4 ukb-b-1209 ukb-b-11615
## 5 ukb-b-1209 ukb-b-11615
## outcome
## 1 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 2 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 3 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 4 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## 5 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615
## exposure method nsnp
## 1 Number of live births || id:ukb-b-1209 MR Egger 11
## 2 Number of live births || id:ukb-b-1209 Weighted median 11
## 3 Number of live births || id:ukb-b-1209 Inverse variance weighted 11
## 4 Number of live births || id:ukb-b-1209 Simple mode 11
## 5 Number of live births || id:ukb-b-1209 Weighted mode 11
## b se pval
## 1 0.20193489 0.31687058 5.398142e-01
## 2 -0.08639196 0.02093159 3.669704e-05
## 3 -0.11453710 0.03819429 2.710433e-03
## 4 -0.08726246 0.03100959 1.834708e-02
## 5 -0.09217527 0.03085260 1.362942e-02
mr_scatter_plot(d_mr,d)
## $`ukb-b-1209.ukb-b-11615`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-11615
d <- make_dat("ukb-b-16489", "ukb-b-1209")
## 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 live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for incompatible alleles:
## rs2606913
d_mr<-mr(d)
## Analysing 'ukb-b-16489' on 'ukb-b-1209'
d_mr
## id.exposure id.outcome outcome
## 1 ukb-b-16489 ukb-b-1209 Number of live births || id:ukb-b-1209
## 2 ukb-b-16489 ukb-b-1209 Number of live births || id:ukb-b-1209
## 3 ukb-b-16489 ukb-b-1209 Number of live births || id:ukb-b-1209
## 4 ukb-b-16489 ukb-b-1209 Number of live births || id:ukb-b-1209
## 5 ukb-b-16489 ukb-b-1209 Number of live births || id:ukb-b-1209
## 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.7659734 0.18580223 5.050002e-05
## 2 Weighted median 261 -0.4994530 0.05223832 1.165712e-21
## 3 Inverse variance weighted 261 -0.4621858 0.04578305 5.805403e-24
## 4 Simple mode 261 -0.5777969 0.19863591 3.941566e-03
## 5 Weighted mode 261 -0.6060249 0.16874968 3.933708e-04
mr_scatter_plot(d_mr,d)
## $`ukb-b-16489.ukb-b-1209`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-16489 ukb-b-1209
d <- make_dat("ukb-b-1209", "ukb-b-16489")
## Extracting data for 11 SNP(s) from 1 GWAS(s)
## Harmonising Number of live births || id:ukb-b-1209 (ukb-b-1209) and Qualifications: College or University degree || id:ukb-b-16489 (ukb-b-16489)
d_mr<-mr(d)
## Analysing 'ukb-b-1209' on 'ukb-b-16489'
d_mr
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-16489
## 2 ukb-b-1209 ukb-b-16489
## 3 ukb-b-1209 ukb-b-16489
## 4 ukb-b-1209 ukb-b-16489
## 5 ukb-b-1209 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 live births || id:ukb-b-1209 MR Egger 11
## 2 Number of live births || id:ukb-b-1209 Weighted median 11
## 3 Number of live births || id:ukb-b-1209 Inverse variance weighted 11
## 4 Number of live births || id:ukb-b-1209 Simple mode 11
## 5 Number of live births || id:ukb-b-1209 Weighted mode 11
## b se pval
## 1 -0.16774852 0.50611050 0.747894700
## 2 -0.05738332 0.02714197 0.034498962
## 3 -0.17225559 0.05782489 0.002892685
## 4 -0.05943561 0.03239429 0.096422764
## 5 -0.05199697 0.02813621 0.094347000
mr_scatter_plot(d_mr,d)
## $`ukb-b-1209.ukb-b-16489`
##
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
## id.exposure id.outcome
## 1 ukb-b-1209 ukb-b-16489
Can these all be explained using years of schooling?
d <- mv_extract_exposures(c("ieu-a-1239", "ukb-b-17729"))
## Please look at vignettes for options on running this locally if you need to run many instances of this command.
## Clumping 1, 397 variants, using EUR population reference
## Removing 84 of 397 variants due to LD with other variants or absence from LD reference panel
## Extracting data for 313 SNP(s) from 2 GWAS(s)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Qualifications: None of the above || id:ukb-b-17729 (ukb-b-17729)
## Removing the following SNPs for incompatible alleles:
## rs510706
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs12134151, rs13130765, rs1455350, rs2414072, rs2478208, rs2545798, rs320693, rs401687, rs60483752, rs6867851, rs7920624
o <- extract_outcome_data(d$SNP, "ukb-b-1209")
## Extracting data for 312 SNP(s) from 1 GWAS(s)
d <- mv_harmonise_data(d, o)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs12134151, rs13130765, rs1455350, rs2414072, rs2478208, rs2545798, rs320693, rs401687, rs60483752, rs6867851, rs7920624
mv_multiple(d)
## $result
## id.exposure exposure id.outcome
## 1 ieu-a-1239 Years of schooling || id:ieu-a-1239 ukb-b-1209
## 2 ukb-b-17729 Qualifications: None of the above || id:ukb-b-17729 ukb-b-1209
## outcome nsnp b se pval
## 1 Number of live births || id:ukb-b-1209 297 -0.1679032 0.09271007 0.07013202
## 2 Number of live births || id:ukb-b-1209 58 0.2120820 0.30357500 0.48479281
d <- mv_extract_exposures(c("ieu-a-1239", "ukb-b-11615"))
## Please look at vignettes for options on running this locally if you need to run many instances of this command.
## Clumping 1, 399 variants, using EUR population reference
## Removing 83 of 399 variants due to LD with other variants or absence from LD reference panel
## Extracting data for 316 SNP(s) from 2 GWAS(s)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615 (ukb-b-11615)
## Removing the following SNPs for incompatible alleles:
## rs510706
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs12134151, rs13130765, rs1455350, rs2414072, rs2478208, rs2545798, rs320693, rs401687, rs60483752, rs6867851, rs7920624
o <- extract_outcome_data(d$SNP, "ukb-b-1209")
## Extracting data for 315 SNP(s) from 1 GWAS(s)
d <- mv_harmonise_data(d, o)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs12134151, rs13130765, rs1455350, rs2414072, rs2478208, rs2545798, rs320693, rs401687, rs60483752, rs6867851, rs7920624
mv_multiple(d)
## $result
## id.exposure
## 1 ieu-a-1239
## 2 ukb-b-11615
## exposure id.outcome
## 1 Years of schooling || id:ieu-a-1239 ukb-b-1209
## 2 Qualifications: A levels/AS levels or equivalent || id:ukb-b-11615 ukb-b-1209
## outcome nsnp b se
## 1 Number of live births || id:ukb-b-1209 293 -0.21040026 0.06121123
## 2 Number of live births || id:ukb-b-1209 44 -0.08690453 0.19190166
## pval
## 1 0.0005875831
## 2 0.6506497765
d <- mv_extract_exposures(c("ieu-a-1239", "ukb-b-16489"))
## Please look at vignettes for options on running this locally if you need to run many instances of this command.
## Clumping 1, 543 variants, using EUR population reference
## Removing 203 of 543 variants due to LD with other variants or absence from LD reference panel
## Extracting data for 340 SNP(s) from 2 GWAS(s)
## Finding proxies for 1 SNPs in outcome ieu-a-1239
## Extracting data for 1 SNP(s) from 1 GWAS(s)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Qualifications: College or University degree || id:ukb-b-16489 (ukb-b-16489)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs10934957, rs1455350, rs1913145, rs2414072, rs2478208, rs2545798, rs320693, rs3751661, rs4887925, rs6867851, rs7047015, rs7624274, rs7920624
o <- extract_outcome_data(d$SNP, "ukb-b-1209")
## Extracting data for 339 SNP(s) from 1 GWAS(s)
d <- mv_harmonise_data(d, o)
## Harmonising Years of schooling || id:ieu-a-1239 (ieu-a-1239) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs10934957, rs1455350, rs1913145, rs2414072, rs2478208, rs2545798, rs320693, rs3751661, rs4887925, rs6867851, rs7047015, rs7624274, rs7920624
mv_multiple(d)
## $result
## id.exposure exposure
## 1 ieu-a-1239 Years of schooling || id:ieu-a-1239
## 2 ukb-b-16489 Qualifications: College or University degree || id:ukb-b-16489
## id.outcome outcome nsnp b se
## 1 ukb-b-1209 Number of live births || id:ukb-b-1209 264 -0.1070157 0.08654169
## 2 ukb-b-1209 Number of live births || id:ukb-b-1209 195 -0.2696701 0.17113091
## pval
## 1 0.2162433
## 2 0.1150691
Qualification effect is explained by years of schooling for no qualifications or A level. However, having a degree is more important.
d <- mv_extract_exposures(c("ukb-b-16489", "ukb-b-7408"))
## Please look at vignettes for options on running this locally if you need to run many instances of this command.
## Clumping 1, 309 variants, using EUR population reference
## Removing 57 of 309 variants due to LD with other variants or absence from LD reference panel
## Extracting data for 252 SNP(s) from 2 GWAS(s)
## Warning in .fun(piece, ...): Duplicated SNPs present in exposure data for phenotype 'Qualifications: College or University degree || id:ukb-b-16489. Just keeping the first instance:
## rs2606913
## Harmonising Qualifications: College or University degree || id:ukb-b-16489 (ukb-b-16489) and Average total household income before tax || id:ukb-b-7408 (ukb-b-7408)
## Removing the following SNPs for incompatible alleles:
## rs2606913
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs10931821, rs10934957, rs12534506, rs13425585, rs1913145, rs2478208, rs3751661, rs62477728, rs7047015, rs7624274, rs7920624
o <- extract_outcome_data(d$SNP, "ukb-b-1209")
## Extracting data for 251 SNP(s) from 1 GWAS(s)
d <- mv_harmonise_data(d, o)
## Harmonising Qualifications: College or University degree || id:ukb-b-16489 (ukb-b-16489) and Number of live births || id:ukb-b-1209 (ukb-b-1209)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs10931821, rs10934957, rs12534506, rs13425585, rs1913145, rs2478208, rs3751661, rs62477728, rs7047015, rs7624274, rs7920624
mv_multiple(d)
## $result
## id.exposure exposure
## 1 ukb-b-16489 Qualifications: College or University degree || id:ukb-b-16489
## 2 ukb-b-7408 Average total household income before tax || id:ukb-b-7408
## id.outcome outcome nsnp b se
## 1 ukb-b-1209 Number of live births || id:ukb-b-1209 231 -0.2959226 0.11182519
## 2 ukb-b-1209 Number of live births || id:ukb-b-1209 28 -0.1218578 0.07459152
## pval
## 1 0.008137844
## 2 0.102328647
Income effect is explained by having a degree level qualification.
Overall, having a degree explains the difference in number of children for this section.