Compare difference between two dataset

##          Phenotype
## Group      0  1
##   Case    37 42
##   Control 52  0
## # A tibble: 37 × 6
##    `Sample ID` `MOMS ID` Phenotype  Group `Adiponectin, ng/ml` Adiponectin
##          <dbl>     <dbl>     <dbl> <fctr>                <dbl>       <dbl>
## 1         2452      2452         0   Case            14906.220   14906.220
## 2         3238      3238         0   Case             6650.462    6650.462
## 3         3388      3388         0   Case            12484.690   12484.690
## 4         3792      3792         0   Case             6631.100    6631.100
## 5         4185      4185         0   Case            11015.030   11015.030
## 6         4316      4316         0   Case             3592.253    3592.253
## 7         4447      4447         0   Case            13855.400   13855.400
## 8         5217      5217         0   Case             7996.852    7996.852
## 9         5345      5345         0   Case            15651.600   15651.600
## 10        5844      5844         0   Case             6379.809    6379.809
## 11        5974      5974         0   Case             6408.764    6408.764
## 12        6186      6186         0   Case             4635.291    4635.291
## 13        6690      6690         0   Case             9351.868    9351.868
## 14        6965      6965         0   Case            13076.570   13076.570
## 15        7036      7036         0   Case            20752.940   20752.940
## 16        7245      7245         0   Case             8786.037    8786.037
## 17        7789      7789         0   Case             3435.894    3435.894
## 18        7945      7945         0   Case             1820.852    1820.852
## 19        8225      8225         0   Case            16848.050   16848.050
## 20        8408      8408         0   Case             6941.431    6941.431
## 21        8666      8666         0   Case            11055.370   11055.370
## 22        8827      8827         0   Case            10672.630   10672.630
## 23        8912      8912         0   Case             7067.828    7067.828
## 24        9033      9033         0   Case            15713.840   15713.840
## 25        9035      9035         0   Case             2492.700    2492.700
## 26        9052      9052         0   Case             8865.281    8865.281
## 27        9248      9248         0   Case            15994.200   15994.200
## 28        9768      9768         0   Case             8607.954    8607.954
## 29       10049     10049         0   Case            20191.170   20191.170
## 30       10102     10102         0   Case            12902.850   12902.850
## 31       10127     10127         0   Case            13015.240   13015.240
## 32         340       340         0   Case             4008.747    4008.747
## 33        1004      1004         0   Case            21103.330   21103.330
## 34        1427      1427         0   Case            18376.890   18376.890
## 35         679       679         0   Case             2934.058    2934.058
## 36        8605      8605         0   Case             6004.371    6004.371
## 37        7921      7921         0   Case             7409.022    7409.022

Analyses based on Case/Control status

## 
##  Shapiro-Wilk normality test
## 
## data:  dat$Adiponectin
## W = 0.97262, p-value = 0.009439
## 
##  Welch Two Sample t-test
## 
## data:  Adiponectin by Group
## t = -1.613, df = 116.47, p-value = 0.1095
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -3289.3102   336.4595
## sample estimates:
##    mean in group Case mean in group Control 
##              9336.351             10812.777
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  Adiponectin by Group
## W = 1688.5, p-value = 0.08597
## alternative hypothesis: true location shift is not equal to 0

P value from Shapiro-Wilk normality test is 0.0094. Suggesting Wilcoxon test might be more appropriate. P value from Wilcox test is 0.086; Suggesting bordline significance between case and control.

## 
## Call:
## lm(formula = Adiponectin ~ Group + `GA in weeks`, data = dat)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
##  -9135  -3490  -1125   3764  13193 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)
## (Intercept)     4519.9     3740.3   1.208    0.229
## GroupControl    1413.1      932.7   1.515    0.132
## `GA in weeks`    442.2      339.2   1.304    0.195
## 
## Residual standard error: 5216 on 128 degrees of freedom
## Multiple R-squared:  0.03186,    Adjusted R-squared:  0.01674 
## F-statistic: 2.106 on 2 and 128 DF,  p-value: 0.1259
## 
## Call:
## lm(formula = Adiponectin ~ Group + bmi, data = dat)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -10730.6  -3327.3   -490.5   3581.0  11470.6 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   19640.7     2871.6   6.840 2.93e-10 ***
## GroupControl    495.4      931.5   0.532 0.595734    
## bmi            -390.0      106.6  -3.659 0.000369 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4996 on 128 degrees of freedom
## Multiple R-squared:  0.1119, Adjusted R-squared:  0.09803 
## F-statistic: 8.064 on 2 and 128 DF,  p-value: 0.0005029
## 
## Call:
## lm(formula = Adiponectin ~ Group + `GA in weeks` + bmi, data = dat)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -10151.9  -3442.8   -984.1   3497.4  12063.9 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    15238.1     4648.6   3.278 0.001349 ** 
## GroupControl     453.7      930.5   0.488 0.626678    
## `GA in weeks`    390.5      324.6   1.203 0.231202    
## bmi             -384.3      106.5  -3.609 0.000441 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4987 on 127 degrees of freedom
## Multiple R-squared:  0.1219, Adjusted R-squared:  0.1012 
## F-statistic: 5.877 on 3 and 127 DF,  p-value: 0.0008642

After adjusting for BMI and/or Gastational age, the group effect becomes non-significant.

Analyses based on Phenotype

## 
##  Shapiro-Wilk normality test
## 
## data:  dat$Adiponectin
## W = 0.97262, p-value = 0.009439
## 
##  Welch Two Sample t-test
## 
## data:  Adiponectin by factor(Phenotype)
## t = 2.0083, df = 76.821, p-value = 0.04813
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##    16.82847 3964.77211
## sample estimates:
## mean in group 0 mean in group 1 
##       10560.685        8569.885
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  Adiponectin by factor(Phenotype)
## W = 2291.5, p-value = 0.03742
## alternative hypothesis: true location shift is not equal to 0

P values from both tests are < 0.05.

## 
## Call:
## lm(formula = Adiponectin ~ factor(Phenotype) + `GA in weeks`, 
##     data = dat)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8758.4 -4071.2  -906.5  3685.9 13487.6 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)          6271.1     3800.3   1.650   0.1014  
## factor(Phenotype)1  -1849.1      979.6  -1.888   0.0614 .
## `GA in weeks`         387.7      339.8   1.141   0.2561  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5191 on 128 degrees of freedom
## Multiple R-squared:  0.04119,    Adjusted R-squared:  0.02621 
## F-statistic: 2.749 on 2 and 128 DF,  p-value: 0.06775
## 
## Call:
## lm(formula = Adiponectin ~ factor(Phenotype) + bmi, data = dat)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -10758.7  -3550.2   -530.8   3443.1  11720.5 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         19888.0     2633.1   7.553 7.09e-12 ***
## factor(Phenotype)1  -1221.4      954.3  -1.280  0.20292    
## bmi                  -376.6      104.2  -3.615  0.00043 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4969 on 128 degrees of freedom
## Multiple R-squared:  0.1212, Adjusted R-squared:  0.1075 
## F-statistic: 8.825 on 2 and 128 DF,  p-value: 0.0002567
## 
## Call:
## lm(formula = Adiponectin ~ factor(Phenotype) + `GA in weeks` + 
##     bmi, data = dat)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -10227.8  -3356.5   -556.6   3308.7  12537.1 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         15900.7     4520.9   3.517 0.000606 ***
## factor(Phenotype)1  -1099.3      960.3  -1.145 0.254454    
## `GA in weeks`         352.8      325.3   1.085 0.280159    
## bmi                  -373.2      104.1  -3.584 0.000481 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4966 on 127 degrees of freedom
## Multiple R-squared:  0.1293, Adjusted R-squared:  0.1087 
## F-statistic: 6.284 on 3 and 127 DF,  p-value: 0.0005205

After adjusting for BMI and/or Gastational age, the Phenotype effect becomes non-significant.