Investigating smoking and alcohol consumption in relation to number of children

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

Alcohol intake frequency

d <- make_dat("ukb-b-5779", "ieu-b-4760")
## API: public: http://gwas-api.mrcieu.ac.uk/
## Extracting data for 99 SNP(s) from 1 GWAS(s)
## Finding proxies for 12 SNPs in outcome ieu-b-4760
## Extracting data for 12 SNP(s) from 1 GWAS(s)
## Harmonising Alcohol intake frequency. || id:ukb-b-5779 (ukb-b-5779) and Number of children || id:ieu-b-4760 (ieu-b-4760)
## Removing the following SNPs for incompatible alleles:
## rs9958320
d_mr<-mr(d)
## Analysing 'ukb-b-5779' on 'ieu-b-4760'
d_mr
##   id.exposure id.outcome                             outcome
## 1  ukb-b-5779 ieu-b-4760 Number of children || id:ieu-b-4760
## 2  ukb-b-5779 ieu-b-4760 Number of children || id:ieu-b-4760
## 3  ukb-b-5779 ieu-b-4760 Number of children || id:ieu-b-4760
## 4  ukb-b-5779 ieu-b-4760 Number of children || id:ieu-b-4760
## 5  ukb-b-5779 ieu-b-4760 Number of children || id:ieu-b-4760
##                                     exposure                    method nsnp
## 1 Alcohol intake frequency. || id:ukb-b-5779                  MR Egger   97
## 2 Alcohol intake frequency. || id:ukb-b-5779           Weighted median   97
## 3 Alcohol intake frequency. || id:ukb-b-5779 Inverse variance weighted   97
## 4 Alcohol intake frequency. || id:ukb-b-5779               Simple mode   97
## 5 Alcohol intake frequency. || id:ukb-b-5779             Weighted mode   97
##             b         se      pval
## 1 0.013574220 0.03190695 0.6714844
## 2 0.027084757 0.01681486 0.1072313
## 3 0.015046111 0.01405198 0.2842835
## 4 0.005872501 0.04007546 0.8838055
## 5 0.020049276 0.02117072 0.3460019
mr_scatter_plot(d_mr,d)
## $`ukb-b-5779.ieu-b-4760`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure id.outcome
## 1  ukb-b-5779 ieu-b-4760
d <- make_dat("ieu-b-4760", "ukb-b-5779")
## Extracting data for 9 SNP(s) from 1 GWAS(s)
## Finding proxies for 1 SNPs in outcome ukb-b-5779
## Extracting data for 1 SNP(s) from 1 GWAS(s)
## Harmonising Number of children || id:ieu-b-4760 (ieu-b-4760) and Alcohol intake frequency. || id:ukb-b-5779 (ukb-b-5779)
d_mr<-mr(d)
## Analysing 'ieu-b-4760' on 'ukb-b-5779'
d_mr
##   id.exposure id.outcome                                    outcome
## 1  ieu-b-4760 ukb-b-5779 Alcohol intake frequency. || id:ukb-b-5779
## 2  ieu-b-4760 ukb-b-5779 Alcohol intake frequency. || id:ukb-b-5779
## 3  ieu-b-4760 ukb-b-5779 Alcohol intake frequency. || id:ukb-b-5779
## 4  ieu-b-4760 ukb-b-5779 Alcohol intake frequency. || id:ukb-b-5779
## 5  ieu-b-4760 ukb-b-5779 Alcohol intake frequency. || id:ukb-b-5779
##                              exposure                    method nsnp
## 1 Number of children || id:ieu-b-4760                  MR Egger    8
## 2 Number of children || id:ieu-b-4760           Weighted median    8
## 3 Number of children || id:ieu-b-4760 Inverse variance weighted    8
## 4 Number of children || id:ieu-b-4760               Simple mode    8
## 5 Number of children || id:ieu-b-4760             Weighted mode    8
##             b        se       pval
## 1 -3.63602594 1.2206633 0.02467715
## 2 -0.17375976 0.1371980 0.20533810
## 3 -0.03025324 0.3099871 0.92225378
## 4 -0.07734315 0.1832517 0.68564181
## 5 -0.12523703 0.2055442 0.56157518
mr_scatter_plot(d_mr,d)
## $`ieu-b-4760.ukb-b-5779`

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

No evidence of an effect.

Ever smoked

d <- make_dat("ukb-b-20261", "ieu-b-4760")
## Extracting data for 84 SNP(s) from 1 GWAS(s)
## Finding proxies for 3 SNPs in outcome ieu-b-4760
## Extracting data for 3 SNP(s) from 1 GWAS(s)
## Harmonising Ever smoked || id:ukb-b-20261 (ukb-b-20261) and Number of children || id:ieu-b-4760 (ieu-b-4760)
d_mr<-mr(d)
## Analysing 'ukb-b-20261' on 'ieu-b-4760'
d_mr
##   id.exposure id.outcome                             outcome
## 1 ukb-b-20261 ieu-b-4760 Number of children || id:ieu-b-4760
## 2 ukb-b-20261 ieu-b-4760 Number of children || id:ieu-b-4760
## 3 ukb-b-20261 ieu-b-4760 Number of children || id:ieu-b-4760
## 4 ukb-b-20261 ieu-b-4760 Number of children || id:ieu-b-4760
## 5 ukb-b-20261 ieu-b-4760 Number of children || id:ieu-b-4760
##                        exposure                    method nsnp         b
## 1 Ever smoked || id:ukb-b-20261                  MR Egger   83 0.1698895
## 2 Ever smoked || id:ukb-b-20261           Weighted median   83 0.1627153
## 3 Ever smoked || id:ukb-b-20261 Inverse variance weighted   83 0.1852426
## 4 Ever smoked || id:ukb-b-20261               Simple mode   83 0.1712634
## 5 Ever smoked || id:ukb-b-20261             Weighted mode   83 0.1795308
##           se        pval
## 1 0.30981186 0.584950576
## 2 0.06037480 0.007037022
## 3 0.06251744 0.003046021
## 4 0.14043367 0.226138415
## 5 0.11342675 0.117318819
mr_scatter_plot(d_mr,d)
## $`ukb-b-20261.ieu-b-4760`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure id.outcome
## 1 ukb-b-20261 ieu-b-4760
d <- make_dat("ieu-b-4760", "ukb-b-20261")
## Extracting data for 9 SNP(s) from 1 GWAS(s)
## Finding proxies for 1 SNPs in outcome ukb-b-20261
## Extracting data for 1 SNP(s) from 1 GWAS(s)
## Harmonising Number of children || id:ieu-b-4760 (ieu-b-4760) and Ever smoked || id:ukb-b-20261 (ukb-b-20261)
d_mr<-mr(d)
## Analysing 'ieu-b-4760' on 'ukb-b-20261'
d_mr
##   id.exposure  id.outcome                       outcome
## 1  ieu-b-4760 ukb-b-20261 Ever smoked || id:ukb-b-20261
## 2  ieu-b-4760 ukb-b-20261 Ever smoked || id:ukb-b-20261
## 3  ieu-b-4760 ukb-b-20261 Ever smoked || id:ukb-b-20261
## 4  ieu-b-4760 ukb-b-20261 Ever smoked || id:ukb-b-20261
## 5  ieu-b-4760 ukb-b-20261 Ever smoked || id:ukb-b-20261
##                              exposure                    method nsnp          b
## 1 Number of children || id:ieu-b-4760                  MR Egger    8 0.45242512
## 2 Number of children || id:ieu-b-4760           Weighted median    8 0.12664061
## 3 Number of children || id:ieu-b-4760 Inverse variance weighted    8 0.08035051
## 4 Number of children || id:ieu-b-4760               Simple mode    8 0.16289517
## 5 Number of children || id:ieu-b-4760             Weighted mode    8 0.16579284
##           se       pval
## 1 0.57610232 0.46213990
## 2 0.05136926 0.01368987
## 3 0.09579917 0.40161575
## 4 0.08006362 0.08136203
## 5 0.10664602 0.16398834
mr_scatter_plot(d_mr,d)
## $`ieu-b-4760.ukb-b-20261`

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

Past tobacco smoking

Note this is coded from 1=Smoke most or all days through to 4=Never smoked

d <- make_dat("ukb-b-2134", "ieu-b-4760")
## Extracting data for 101 SNP(s) from 1 GWAS(s)
## Finding proxies for 10 SNPs in outcome ieu-b-4760
## Extracting data for 10 SNP(s) from 1 GWAS(s)
## Harmonising Past tobacco smoking || id:ukb-b-2134 (ukb-b-2134) and Number of children || id:ieu-b-4760 (ieu-b-4760)
d_mr<-mr(d)
## Analysing 'ukb-b-2134' on 'ieu-b-4760'
d_mr
##   id.exposure id.outcome                             outcome
## 1  ukb-b-2134 ieu-b-4760 Number of children || id:ieu-b-4760
## 2  ukb-b-2134 ieu-b-4760 Number of children || id:ieu-b-4760
## 3  ukb-b-2134 ieu-b-4760 Number of children || id:ieu-b-4760
## 4  ukb-b-2134 ieu-b-4760 Number of children || id:ieu-b-4760
## 5  ukb-b-2134 ieu-b-4760 Number of children || id:ieu-b-4760
##                                exposure                    method nsnp
## 1 Past tobacco smoking || id:ukb-b-2134                  MR Egger   98
## 2 Past tobacco smoking || id:ukb-b-2134           Weighted median   98
## 3 Past tobacco smoking || id:ukb-b-2134 Inverse variance weighted   98
## 4 Past tobacco smoking || id:ukb-b-2134               Simple mode   98
## 5 Past tobacco smoking || id:ukb-b-2134             Weighted mode   98
##             b         se         pval
## 1 -0.05508667 0.08368962 5.119685e-01
## 2 -0.07111839 0.01988340 3.478643e-04
## 3 -0.07682483 0.01960413 8.898768e-05
## 4 -0.07310566 0.04899504 1.389173e-01
## 5 -0.07310566 0.03995500 7.036643e-02
mr_scatter_plot(d_mr,d)
## $`ukb-b-2134.ieu-b-4760`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure id.outcome
## 1  ukb-b-2134 ieu-b-4760
d <- make_dat("ieu-b-4760", "ukb-b-2134")
## Extracting data for 9 SNP(s) from 1 GWAS(s)
## Finding proxies for 1 SNPs in outcome ukb-b-2134
## Extracting data for 1 SNP(s) from 1 GWAS(s)
## Harmonising Number of children || id:ieu-b-4760 (ieu-b-4760) and Past tobacco smoking || id:ukb-b-2134 (ukb-b-2134)
d_mr<-mr(d)
## Analysing 'ieu-b-4760' on 'ukb-b-2134'
d_mr
##   id.exposure id.outcome                               outcome
## 1  ieu-b-4760 ukb-b-2134 Past tobacco smoking || id:ukb-b-2134
## 2  ieu-b-4760 ukb-b-2134 Past tobacco smoking || id:ukb-b-2134
## 3  ieu-b-4760 ukb-b-2134 Past tobacco smoking || id:ukb-b-2134
## 4  ieu-b-4760 ukb-b-2134 Past tobacco smoking || id:ukb-b-2134
## 5  ieu-b-4760 ukb-b-2134 Past tobacco smoking || id:ukb-b-2134
##                              exposure                    method nsnp          b
## 1 Number of children || id:ieu-b-4760                  MR Egger    8 -1.2181460
## 2 Number of children || id:ieu-b-4760           Weighted median    8 -0.3530698
## 3 Number of children || id:ieu-b-4760 Inverse variance weighted    8 -0.2701016
## 4 Number of children || id:ieu-b-4760               Simple mode    8 -0.6078469
## 5 Number of children || id:ieu-b-4760             Weighted mode    8 -0.6078469
##          se       pval
## 1 1.6821157 0.49621282
## 2 0.1454608 0.01521376
## 3 0.2775006 0.33038598
## 4 0.1997290 0.01875791
## 5 0.3131973 0.09342770
mr_scatter_plot(d_mr,d)
## $`ieu-b-4760.ukb-b-2134`

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

Never smoked

d <- make_dat("ukb-d-20116_0", "ieu-b-4760")
## Extracting data for 84 SNP(s) from 1 GWAS(s)
## Finding proxies for 16 SNPs in outcome ieu-b-4760
## Extracting data for 16 SNP(s) from 1 GWAS(s)
## Harmonising Smoking status: Never || id:ukb-d-20116_0 (ukb-d-20116_0) and Number of children || id:ieu-b-4760 (ieu-b-4760)
d_mr<-mr(d)
## Analysing 'ukb-d-20116_0' on 'ieu-b-4760'
d_mr
##     id.exposure id.outcome                             outcome
## 1 ukb-d-20116_0 ieu-b-4760 Number of children || id:ieu-b-4760
## 2 ukb-d-20116_0 ieu-b-4760 Number of children || id:ieu-b-4760
## 3 ukb-d-20116_0 ieu-b-4760 Number of children || id:ieu-b-4760
## 4 ukb-d-20116_0 ieu-b-4760 Number of children || id:ieu-b-4760
## 5 ukb-d-20116_0 ieu-b-4760 Number of children || id:ieu-b-4760
##                                    exposure                    method nsnp
## 1 Smoking status: Never || id:ukb-d-20116_0                  MR Egger   76
## 2 Smoking status: Never || id:ukb-d-20116_0           Weighted median   76
## 3 Smoking status: Never || id:ukb-d-20116_0 Inverse variance weighted   76
## 4 Smoking status: Never || id:ukb-d-20116_0               Simple mode   76
## 5 Smoking status: Never || id:ukb-d-20116_0             Weighted mode   76
##            b         se         pval
## 1 -0.1560711 0.20709484 4.534679e-01
## 2 -0.1577111 0.05123179 2.081264e-03
## 3 -0.1770677 0.04543209 9.722494e-05
## 4 -0.1071034 0.12845912 4.070668e-01
## 5 -0.1396054 0.09777519 1.574944e-01
mr_scatter_plot(d_mr,d)
## $`ukb-d-20116_0.ieu-b-4760`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##     id.exposure id.outcome
## 1 ukb-d-20116_0 ieu-b-4760
d <- make_dat("ieu-b-4760", "ukb-d-20116_0")
## Extracting data for 9 SNP(s) from 1 GWAS(s)
## Finding proxies for 1 SNPs in outcome ukb-d-20116_0
## Extracting data for 1 SNP(s) from 1 GWAS(s)
## Harmonising Number of children || id:ieu-b-4760 (ieu-b-4760) and Smoking status: Never || id:ukb-d-20116_0 (ukb-d-20116_0)
d_mr<-mr(d)
## Analysing 'ieu-b-4760' on 'ukb-d-20116_0'
d_mr
##   id.exposure    id.outcome                                   outcome
## 1  ieu-b-4760 ukb-d-20116_0 Smoking status: Never || id:ukb-d-20116_0
## 2  ieu-b-4760 ukb-d-20116_0 Smoking status: Never || id:ukb-d-20116_0
## 3  ieu-b-4760 ukb-d-20116_0 Smoking status: Never || id:ukb-d-20116_0
## 4  ieu-b-4760 ukb-d-20116_0 Smoking status: Never || id:ukb-d-20116_0
## 5  ieu-b-4760 ukb-d-20116_0 Smoking status: Never || id:ukb-d-20116_0
##                              exposure                    method nsnp          b
## 1 Number of children || id:ieu-b-4760                  MR Egger    8 -0.5360697
## 2 Number of children || id:ieu-b-4760           Weighted median    8 -0.1641195
## 3 Number of children || id:ieu-b-4760 Inverse variance weighted    8 -0.1720589
## 4 Number of children || id:ieu-b-4760               Simple mode    8 -0.3585789
## 5 Number of children || id:ieu-b-4760             Weighted mode    8 -0.3543304
##           se        pval
## 1 0.79579686 0.525633458
## 2 0.08066357 0.041889402
## 3 0.13002923 0.185757960
## 4 0.08136634 0.003130293
## 5 0.15260511 0.053246993
mr_scatter_plot(d_mr,d)
## $`ieu-b-4760.ukb-d-20116_0`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure    id.outcome
## 1  ieu-b-4760 ukb-d-20116_0

Current tabacco smoking

d <- make_dat("ukb-b-223", "ieu-b-4760")
## Extracting data for 35 SNP(s) from 1 GWAS(s)
## Finding proxies for 3 SNPs in outcome ieu-b-4760
## Extracting data for 3 SNP(s) from 1 GWAS(s)
## Harmonising Current tobacco smoking || id:ukb-b-223 (ukb-b-223) and Number of children || id:ieu-b-4760 (ieu-b-4760)
d_mr<-mr(d)
## Analysing 'ukb-b-223' on 'ieu-b-4760'
d_mr
##   id.exposure id.outcome                             outcome
## 1   ukb-b-223 ieu-b-4760 Number of children || id:ieu-b-4760
## 2   ukb-b-223 ieu-b-4760 Number of children || id:ieu-b-4760
## 3   ukb-b-223 ieu-b-4760 Number of children || id:ieu-b-4760
## 4   ukb-b-223 ieu-b-4760 Number of children || id:ieu-b-4760
## 5   ukb-b-223 ieu-b-4760 Number of children || id:ieu-b-4760
##                                  exposure                    method nsnp
## 1 Current tobacco smoking || id:ukb-b-223                  MR Egger   35
## 2 Current tobacco smoking || id:ukb-b-223           Weighted median   35
## 3 Current tobacco smoking || id:ukb-b-223 Inverse variance weighted   35
## 4 Current tobacco smoking || id:ukb-b-223               Simple mode   35
## 5 Current tobacco smoking || id:ukb-b-223             Weighted mode   35
##             b         se      pval
## 1 -0.14346771 0.25499786 0.5774940
## 2 -0.01873342 0.07086513 0.7915078
## 3  0.05904947 0.06963090 0.3964182
## 4 -0.02109411 0.15408052 0.8919148
## 5 -0.03937461 0.11543406 0.7351270
mr_scatter_plot(d_mr,d)
## $`ukb-b-223.ieu-b-4760`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure id.outcome
## 1   ukb-b-223 ieu-b-4760
d <- make_dat("ieu-b-4760", "ukb-b-223")
## Extracting data for 9 SNP(s) from 1 GWAS(s)
## Finding proxies for 1 SNPs in outcome ukb-b-223
## Extracting data for 1 SNP(s) from 1 GWAS(s)
## Harmonising Number of children || id:ieu-b-4760 (ieu-b-4760) and Current tobacco smoking || id:ukb-b-223 (ukb-b-223)
d_mr<-mr(d)
## Analysing 'ieu-b-4760' on 'ukb-b-223'
d_mr
##   id.exposure id.outcome                                 outcome
## 1  ieu-b-4760  ukb-b-223 Current tobacco smoking || id:ukb-b-223
## 2  ieu-b-4760  ukb-b-223 Current tobacco smoking || id:ukb-b-223
## 3  ieu-b-4760  ukb-b-223 Current tobacco smoking || id:ukb-b-223
## 4  ieu-b-4760  ukb-b-223 Current tobacco smoking || id:ukb-b-223
## 5  ieu-b-4760  ukb-b-223 Current tobacco smoking || id:ukb-b-223
##                              exposure                    method nsnp
## 1 Number of children || id:ieu-b-4760                  MR Egger    8
## 2 Number of children || id:ieu-b-4760           Weighted median    8
## 3 Number of children || id:ieu-b-4760 Inverse variance weighted    8
## 4 Number of children || id:ieu-b-4760               Simple mode    8
## 5 Number of children || id:ieu-b-4760             Weighted mode    8
##             b         se        pval
## 1 -0.23580401 0.59795606 0.706957540
## 2  0.13210077 0.04796526 0.005885509
## 3  0.05147626 0.09793771 0.599164703
## 4  0.17505542 0.05200436 0.011982874
## 5  0.17505542 0.04460993 0.005718577
mr_scatter_plot(d_mr,d)
## $`ieu-b-4760.ukb-b-223`

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

Smoking and SES

Use degree for SES and Past Smoking

d <- mv_extract_exposures(c("ukb-b-16489", "ukb-b-2134"))
## 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 91 of 362 variants due to LD with other variants or absence from LD reference panel
## Extracting data for 271 SNP(s) from 2 GWAS(s)
## Harmonising Qualifications: College or University degree || id:ukb-b-16489 (ukb-b-16489) and Past tobacco smoking || id:ukb-b-2134 (ukb-b-2134)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs10931821, rs10934957, rs12534506, rs13425585, rs1913145, rs2478208, rs3751661, rs62477728, rs7047015, rs7596680, rs7624274
o <- extract_outcome_data(d$SNP, "ieu-b-4760")
## Extracting data for 271 SNP(s) from 1 GWAS(s)
## Finding proxies for 23 SNPs in outcome ieu-b-4760
## Extracting data for 23 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 children || id:ieu-b-4760 (ieu-b-4760)
## Removing the following SNPs for being palindromic with intermediate allele frequencies:
## rs10931821, rs10934957, rs12534506, rs13425585, rs1913145, rs2478208, rs3751661, rs62477728, rs7047015, rs7596680, rs7624274
mv_multiple(d)
## $result
##   id.exposure                                                       exposure
## 1 ukb-b-16489 Qualifications: College or University degree || id:ukb-b-16489
## 2  ukb-b-2134                          Past tobacco smoking || id:ukb-b-2134
##   id.outcome                             outcome nsnp           b         se
## 1 ieu-b-4760 Number of children || id:ieu-b-4760  204 -0.29775872 0.03101850
## 2 ieu-b-4760 Number of children || id:ieu-b-4760   54 -0.01528376 0.01972691
##           pval
## 1 8.041855e-22
## 2 4.384772e-01

Past tobacco smoking effect on number of children is explained by having a degree.