Last updated: 2020-08-11

Checks: 6 1

Knit directory: gene_level_fine_mapping/

This reproducible R Markdown analysis was created with workflowr (version 1.6.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20200622) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Using absolute paths to the files within your workflowr project makes it difficult for you and others to run your code on a different machine. Change the absolute path(s) below to the suggested relative path(s) to make your code more reproducible.

absolute relative
/Users/nicholeyang/Desktop/gene_level_fine_mapping/data/train_add_hic.RData data/train_add_hic.RData

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version f2e73a9. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    analysis/.DS_Store

Untracked files:
    Untracked:  analysis/atac_eqtl.Rmd
    Untracked:  data/hic_eqtl.RData
    Untracked:  data/train_add_hic.RData
    Untracked:  data/train_all.RData

Unstaged changes:
    Modified:   analysis/add_hic_feature.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/model_hic.Rmd) and HTML (docs/model_hic.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd f2e73a9 yunqiyang0215 2020-08-11 wflow_publish(“analysis/model_hic.Rmd”)
html 1a67244 yunqiyang0215 2020-08-06 Build site.
Rmd 1d8b4f2 yunqiyang0215 2020-08-06 wflow_publish(“analysis/model_hic.Rmd”)
html d0ba55a yunqiyang0215 2020-08-06 Build site.
Rmd 89925c3 yunqiyang0215 2020-08-06 wflow_publish(“analysis/model_hic.Rmd”)
html 5e78e6f yunqiyang0215 2020-08-05 Build site.
Rmd 2bbd873 yunqiyang0215 2020-08-05 wflow_publish(“analysis/model_hic.Rmd”)
html addf17d yunqiyang0215 2020-08-05 Build site.
Rmd 1622d52 yunqiyang0215 2020-08-05 wflow_publish(“analysis/model_hic.Rmd”)

load("/Users/nicholeyang/Desktop/gene_level_fine_mapping/data/train_add_hic.RData")

data summary

head(dat_add_hic)
  gene_name      snp_loc38             variant_id UTR5 UTR3 exon intron
1      A1BG chr19:57866502 chr19_57866502_T_C_b38    0    0    0      0
2      A1BG chr19:58059544 chr19_58059544_T_G_b38    0    0    0      0
3      A1BG chr19:58170494 chr19_58170494_G_T_b38    0    0    0      0
4      A1BG chr19:58228973 chr19_58228973_T_G_b38    0    0    0      0
5      A1BG chr19:58330182 chr19_58330182_C_T_b38    0    0    0      0
6      A1BG chr19:58359927 chr19_58359927_G_A_b38    0    0    0      0
  upstream tss_dist_to_snp y Mon Mac0 Mac1 Mac2 Neu MK EP Ery FoeT nCD4 tCD4
1        0          481132 0   0    0    0    0   0  0  0   0    0    0    0
2        0          288090 0   0    0    0    0   0  0  0   0    0    0    0
3        0          177140 0   0    0    0    0   0  0  0   0    0    0    0
4        0          118661 0   0    0    0    0   0  0  0   0    0    0    0
5        0           17452 1   0    0    0    0   0  0  0   0    0    0    0
6        0            6428 1   0    0    0    0   0  0  0   0    0    0    0
  aCD4 naCD4 nCD8 tCD8 nB tB
1    0     0    0    0  0  0
2    0     0    0    0  0  0
3    0     0    0    0  0  0
4    0     0    0    0  0  0
5    0     0    0    0  0  0
6    0     0    0    0  0  0
hist(dat_add_hic$tss_dist_to_snp, xlab = 'distance between tss and snp', main = 'Histogram on all data')

Version Author Date
5e78e6f yunqiyang0215 2020-08-05
hist(dat_add_hic$tss_dist_to_snp[dat_add_hic$y==1], breaks = 20,  xlab = 'positive', main = '')

Version Author Date
d0ba55a yunqiyang0215 2020-08-06
hist(dat_add_hic$tss_dist_to_snp[dat_add_hic$y==0], breaks = 20, xlab = 'negative', main = '')

Version Author Date
d0ba55a yunqiyang0215 2020-08-06
range(dat_add_hic$tss_dist_to_snp)
[1]       0 2176373
range(dat_add_hic$tss_dist_to_snp[dat_add_hic$y == 1])
[1]      0 946399

unify the HiC feature

hic = apply(dat_add_hic[, c(11:27)], 1, sum)
dat_add_hic$hic = ifelse(hic>0, 1, 0)
sub_dat = dat_add_hic[dat_add_hic$y == 1, ]
prop_hic_pos = sum(sub_dat$hic == 1)/dim(sub_dat)[1]

sub_dat = dat_add_hic[dat_add_hic$y == 0, ]
prop_hic_neg = sum(sub_dat$hic == 1)/dim(sub_dat)[1]
prop_hic_pos
[1] 0.07263733
prop_hic_neg
[1] 0.1394212

by distance hic signature summary

dist_range = c(0, 1e4, 5e4, 1e5, 3e6)
prop_pos = rep(NA, length(dist_range)-1)
prop_neg = rep(NA, length(dist_range)-1)


for (i in 1:(length(dist_range)-1)){
  
  sub_dat = dat_add_hic[dat_add_hic$tss_dist_to_snp %in% seq(dist_range[i], dist_range[i+1], by = 1), ]
  
  dat_pos = sub_dat[sub_dat$y == 1, ]
  dat_neg = sub_dat[sub_dat$y == 0, ]
  
  prop_pos[i] = sum(dat_pos$hic == 1)/dim(dat_pos)[1]
  prop_neg[i] = sum(dat_neg$hic == 1)/dim(dat_neg)[1]
}
plot(prop_pos, type = 'b', ylim = c(0, 0.3), ylab = 'proportions')
points(prop_neg, type = 'b', col = 'red')
legend('topright', legend =  c('positive', 'negative'), col = c('black', 'red'), lty = 1)

cat_tss_dist_pos = cut(dat_add_hic[dat_add_hic$y==1, ]$tss_dist_to_snp, breaks = dist_range)
cat_tss_dist_neg = cut(dat_add_hic[dat_add_hic$y==0, ]$tss_dist_to_snp, breaks = dist_range)

table(cat_tss_dist_pos)
cat_tss_dist_pos
    (0,1e+04] (1e+04,5e+04] (5e+04,1e+05] (1e+05,3e+06] 
         2558           902           230           146 
table(cat_tss_dist_neg)
cat_tss_dist_neg
    (0,1e+04] (1e+04,5e+04] (5e+04,1e+05] (1e+05,3e+06] 
         1263          5833          7014         48505 

regress unified HiC feature

fit1 = glm(y ~ hic, data = dat_add_hic, family = "binomial")
fit2 = glm(y ~ hic + tss_dist_to_snp + hic*tss_dist_to_snp, data =dat_add_hic, family = "binomial")
Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
fit3 = glm(y ~ hic , data =dat_add_hic[dat_add_hic$tss_dist_to_snp> 5e4, ], family = "binomial")

summary(fit1)

Call:
glm(formula = y ~ hic, family = "binomial", data = dat_add_hic)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.3578  -0.3578  -0.3578  -0.3578   2.6362  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept) -2.71655    0.01730 -157.02   <2e-16 ***
hic         -0.72676    0.06323  -11.49   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 29356  on 66456  degrees of freedom
Residual deviance: 29195  on 66455  degrees of freedom
AIC: 29199

Number of Fisher Scoring iterations: 6
summary(fit2)

Call:
glm(formula = y ~ hic + tss_dist_to_snp + hic * tss_dist_to_snp, 
    family = "binomial", data = dat_add_hic)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.2091  -0.1315  -0.0094  -0.0004   8.4904  

Coefficients:
                      Estimate Std. Error z value Pr(>|z|)    
(Intercept)          7.427e-02  2.851e-02   2.605  0.00918 ** 
hic                 -1.032e+00  1.025e-01 -10.065  < 2e-16 ***
tss_dist_to_snp     -4.239e-05  8.096e-07 -52.362  < 2e-16 ***
hic:tss_dist_to_snp  1.563e-05  1.803e-06   8.664  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 29356  on 66456  degrees of freedom
Residual deviance: 15875  on 66453  degrees of freedom
AIC: 15883

Number of Fisher Scoring iterations: 10
summary(fit3)

Call:
glm(formula = y ~ hic, family = "binomial", data = dat_add_hic[dat_add_hic$tss_dist_to_snp > 
    50000, ])

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1363  -0.1125  -0.1125  -0.1125   3.1828  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept) -5.05877    0.05763 -87.779  < 2e-16 ***
hic          0.38376    0.13095   2.931  0.00338 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4502.8  on 55893  degrees of freedom
AIC: 4506.8

Number of Fisher Scoring iterations: 8

plot the proportion of features in the positive/negative set

for (i in 1:(length(dist_range)-1)){
  
  par(mfrow = c(1,2))
  
  sub_dat = dat_add_hic[dat_add_hic$tss_dist_to_snp %in% seq(dist_range[i], dist_range[i+1], by = 1), ]

  # proportion of features in the positive set
  tot_count = apply(sub_dat[sub_dat$y==1, c(11:27)], 2, function(x) sum(x == 1))
  barplot(tot_count/dim(sub_dat[sub_dat$y==1, ])[1], las = 2, main = paste('positive set', dist_range[i], dist_range[i+1], sep = ':'), cex.names=.7)

  # proportion of features in the negative set
  tot_count = apply(sub_dat[sub_dat$y==0, c(11:27)], 2, function(x) sum(x == 1))
  barplot(tot_count/dim(sub_dat[sub_dat$y==0, ])[1], las = 2, 
          main = paste('negative set', dist_range[i], dist_range[i+1], sep = ':'), cex.names=.7)
  
}

one variable logistic regression by range

sub_dat = dat_add_hic[dat_add_hic$tss_dist_to_snp > 5e4, ]
for (i  in 11: 27){
  fit = glm(sub_dat$y ~ sub_dat[, i],  family = "binomial")
  print(summary(fit))
}

Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1452  -0.1145  -0.1145  -0.1145   3.1718  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.02350    0.05377 -93.422   <2e-16 ***
sub_dat[, i]  0.47604    0.19744   2.411   0.0159 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4505.6  on 55893  degrees of freedom
AIC: 4509.6

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1499  -0.1146  -0.1146  -0.1146   3.1716  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.02300    0.05354 -93.814  < 2e-16 ***
sub_dat[, i]  0.53932    0.20813   2.591  0.00956 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4504.9  on 55893  degrees of freedom
AIC: 4508.9

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1671  -0.1137  -0.1137  -0.1137   3.1766  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.03887    0.05393 -93.426  < 2e-16 ***
sub_dat[, i]  0.77478    0.19160   4.044 5.26e-05 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4497.4  on 55893  degrees of freedom
AIC: 4501.4

Number of Fisher Scoring iterations: 8


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1753  -0.1132  -0.1132  -0.1132   3.1793  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.04761    0.05417 -93.184  < 2e-16 ***
sub_dat[, i]  0.87977    0.18359   4.792 1.65e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4492.4  on 55893  degrees of freedom
AIC: 4496.4

Number of Fisher Scoring iterations: 8


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1193  -0.1160  -0.1160  -0.1160   3.1638  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.99795    0.05325  -93.87   <2e-16 ***
sub_dat[, i]  0.05631    0.22535    0.25    0.803    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.6  on 55893  degrees of freedom
AIC: 4514.6

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1381  -0.1152  -0.1152  -0.1152   3.1682  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.01210    0.05324 -94.138   <2e-16 ***
sub_dat[, i]  0.36451    0.22563   1.616    0.106    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4508.3  on 55893  degrees of freedom
AIC: 4512.3

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1240  -0.1159  -0.1159  -0.1159   3.1645  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.00030    0.05287 -94.570   <2e-16 ***
sub_dat[, i]  0.13566    0.25646   0.529    0.597    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.4  on 55893  degrees of freedom
AIC: 4514.4

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1163  -0.1163  -0.1163  -0.1163   3.1710  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.99363    0.05295 -94.310   <2e-16 ***
sub_dat[, i] -0.02754    0.24899  -0.111    0.912    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.7  on 55893  degrees of freedom
AIC: 4514.7

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1171  -0.1171  -0.1171  -0.1171   3.2712  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.97973    0.05267 -94.552   <2e-16 ***
sub_dat[, i] -0.36591    0.28295  -1.293    0.196    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4508.8  on 55893  degrees of freedom
AIC: 4512.8

Number of Fisher Scoring iterations: 8


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1164  -0.1164  -0.1164  -0.1164   3.1772  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.99182    0.05340 -93.484   <2e-16 ***
sub_dat[, i] -0.04908    0.21586  -0.227     0.82    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.6  on 55893  degrees of freedom
AIC: 4514.6

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
   Min      1Q  Median      3Q     Max  
-0.119  -0.116  -0.116  -0.116   3.164  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.99734    0.05310  -94.12   <2e-16 ***
sub_dat[, i]  0.04971    0.23625    0.21    0.833    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.7  on 55893  degrees of freedom
AIC: 4514.7

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1162  -0.1162  -0.1162  -0.1162   3.1659  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.99430    0.05325 -93.796   <2e-16 ***
sub_dat[, i] -0.01061    0.22530  -0.047    0.962    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.7  on 55893  degrees of freedom
AIC: 4514.7

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1259  -0.1156  -0.1156  -0.1156   3.1660  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.00501    0.05347 -93.604   <2e-16 ***
sub_dat[, i]  0.17171    0.21179   0.811    0.417    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.1  on 55893  degrees of freedom
AIC: 4514.1

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1287  -0.1154  -0.1154  -0.1154   3.1669  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.00805    0.05355 -93.528   <2e-16 ***
sub_dat[, i]  0.21889    0.20784   1.053    0.292    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4509.7  on 55893  degrees of freedom
AIC: 4513.7

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1162  -0.1162  -0.1162  -0.1162   3.1631  

Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.994824   0.053321 -93.674   <2e-16 ***
sub_dat[, i] -0.001159   0.220436  -0.005    0.996    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.7  on 55893  degrees of freedom
AIC: 4514.7

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1167  -0.1167  -0.1167  -0.1167   3.2257  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)   -4.9855     0.0528 -94.416   <2e-16 ***
sub_dat[, i]  -0.2115     0.2641  -0.801    0.423    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.0  on 55893  degrees of freedom
AIC: 4514

Number of Fisher Scoring iterations: 7


Call:
glm(formula = sub_dat$y ~ sub_dat[, i], family = "binomial")

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.1163  -0.1163  -0.1163  -0.1163   3.1703  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -4.99368    0.05302 -94.180   <2e-16 ***
sub_dat[, i] -0.02507    0.24231  -0.103    0.918    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4510.7  on 55894  degrees of freedom
Residual deviance: 4510.7  on 55893  degrees of freedom
AIC: 4514.7

Number of Fisher Scoring iterations: 7

sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] workflowr_1.6.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4      rprojroot_1.3-2 digest_0.6.25   later_1.0.0    
 [5] R6_2.4.1        backports_1.1.5 git2r_0.26.1    magrittr_1.5   
 [9] evaluate_0.14   highr_0.8       stringi_1.4.6   rlang_0.4.5    
[13] fs_1.3.2        promises_1.1.0  whisker_0.4     rmarkdown_2.1  
[17] tools_3.6.3     stringr_1.4.0   glue_1.3.2      httpuv_1.5.2   
[21] xfun_0.12       yaml_2.2.1      compiler_3.6.3  htmltools_0.4.0
[25] knitr_1.28