Investigating health 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

Age started wearing glasses or contact lenses

d <- make_dat("ukb-b-5801", "ukb-b-2227")
## API: public: http://gwas-api.mrcieu.ac.uk/
## Extracting data for 84 SNP(s) from 1 GWAS(s)
## Harmonising Age started wearing glasses or contact lenses || id:ukb-b-5801 (ukb-b-5801) and Number of children fathered || id:ukb-b-2227 (ukb-b-2227)
d_mr<-mr(d)
## Analysing 'ukb-b-5801' on 'ukb-b-2227'
d_mr
##   id.exposure id.outcome                                      outcome
## 1  ukb-b-5801 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 2  ukb-b-5801 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 3  ukb-b-5801 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 4  ukb-b-5801 ukb-b-2227 Number of children fathered || id:ukb-b-2227
## 5  ukb-b-5801 ukb-b-2227 Number of children fathered || id:ukb-b-2227
##                                                         exposure
## 1 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 2 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 3 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 4 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 5 Age started wearing glasses or contact lenses || id:ukb-b-5801
##                      method nsnp           b         se        pval
## 1                  MR Egger   84 0.006964567 0.06865001 0.919440631
## 2           Weighted median   84 0.055442271 0.02709505 0.040735295
## 3 Inverse variance weighted   84 0.075913221 0.02542759 0.002831466
## 4               Simple mode   84 0.007173531 0.06180545 0.907880350
## 5             Weighted mode   84 0.051831886 0.04029672 0.201930284
mr_scatter_plot(d_mr,d)
## $`ukb-b-5801.ukb-b-2227`

## 
## attr(,"split_type")
## [1] "data.frame"
## attr(,"split_labels")
##   id.exposure id.outcome
## 1  ukb-b-5801 ukb-b-2227
d <- make_dat("ukb-b-2227", "ukb-b-5801")
## Extracting data for 3 SNP(s) from 1 GWAS(s)
## Harmonising Number of children fathered || id:ukb-b-2227 (ukb-b-2227) and Age started wearing glasses or contact lenses || id:ukb-b-5801 (ukb-b-5801)
d_mr<-mr(d)
## Analysing 'ukb-b-2227' on 'ukb-b-5801'
d_mr
##   id.exposure id.outcome
## 1  ukb-b-2227 ukb-b-5801
## 2  ukb-b-2227 ukb-b-5801
## 3  ukb-b-2227 ukb-b-5801
## 4  ukb-b-2227 ukb-b-5801
## 5  ukb-b-2227 ukb-b-5801
##                                                          outcome
## 1 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 2 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 3 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 4 Age started wearing glasses or contact lenses || id:ukb-b-5801
## 5 Age started wearing glasses or contact lenses || id:ukb-b-5801
##                                       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 4.5977433 2.0859807 0.271151519
## 2 0.4533125 0.1481831 0.002219757
## 3 0.5499686 0.1836562 0.002748458
## 4 0.3839821 0.2010778 0.196378560
## 5 0.4040977 0.1875476 0.163993173
mr_scatter_plot(d_mr,d)
## $`ukb-b-2227.ukb-b-5801`

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

Somewhat related, perhaps reverse causal or confounded by another factor?