########### Cargar Funciones

path="/Users/mauriciogutierrez/Library/Mobile Documents/com~apple~CloudDocs/estadisticas";
pathfunctions=paste(path,"/general_functions_new.R",sep="")
pathdatabase=paste(path,"/R_P/datos.xls",sep="")
source(pathfunctions)
## Loading required package: XLConnectJars
## XLConnect 0.2-11 by Mirai Solutions GmbH [aut],
##   Martin Studer [cre],
##   The Apache Software Foundation [ctb, cph] (Apache POI, Apache Commons
##     Codec),
##   Stephen Colebourne [ctb, cph] (Joda-Time Java library)
## http://www.mirai-solutions.com ,
## http://miraisolutions.wordpress.com
## Loading required package: reshape2
## Loading required package: stringr
########### Preparar datos

data=readexcel(pathdatabase,"Hoja1")

data$HbA1c_pre=as.numeric(data$HbA1c_pre)
data$HbA1c_post=as.numeric(data$HbA1c_post)
control=data[which(data$grupo=="C"),]
intervencion=data[which(data$grupo=="I"),]
hombres=data[which(data$sexo==1),]
mujeres=data[which(data$sexo==2),]
control_hombres=data[which(data$grupo=="C" & data$sexo==1),]
control_mujeres=data[which(data$grupo=="C" & data$sexo==2),]
intervencion_hombres=data[which(data$grupo=="I" & data$sexo==1),]
intervencion_mujeres=data[which(data$grupo=="I" & data$sexo==2),]


matched_means(control,control$IL.6_pre,control$IL.6_post)
## 
##                                      IL.6_pre IL.6_post
## n                                          19        19
## Mean                                     3.37      3.82
## Median                                   3.04       3.9
## Sd                                       1.62      1.41
## Min                                       1.5       1.5
## Max                                       7.4         7
## Range                                     5.9       5.5
## Q1                                       2.22      2.87
## Q3                                        4.2      4.82
## Iqr                                      1.98      1.95
## Normal                                    0.1     0.895
## IIC                                      3.35       3.8
## ICS                                       3.4      3.84
## Summary     Mean[ICI-ICS] 3.82 ( 3.8 - 3.84 )          
## Groups                          Homocedastics          
## Normality                                 Yes          
## Differences                                No          
## p-value                                 0.062          
## Method                      t-Student(Pooled)

matched_means(intervencion,intervencion$IL.6_pre,intervencion$IL.6_post)
## 
##                                       IL.6_pre IL.6_post
## n                                           16        16
## Mean                                       4.5      2.94
## Median                                    3.39      2.89
## Sd                                        3.31      0.95
## Min                                        1.5       1.2
## Max                                         13         5
## Range                                     11.5       3.8
## Q1                                        2.01      2.26
## Q3                                        5.77      3.49
## Iqr                                       3.76      1.23
## Normal                                   0.008     0.984
## IIC                                       4.44      2.92
## ICS                                       4.55      2.95
## Summary     Median[Q1-Q3] 2.89 ( 2.26 - 3.49 )          
## Groups                         Heteroscedastic          
## Normality                                   No          
## Differences                                Yes          
## p-value                                  0.044          
## Method                                Wilcoxon

means(data,data$edad)
## 
##                                           edad
## n                                           35
## Mean                                     63.31
## Median                                      61
## Sd                                        6.34
## Min                                         54
## Max                                         77
## Range                                       23
## Q1                                        58.5
## Q3                                          68
## Iqr                                        9.5
## Normality                                0.071
## ICI                                      63.25
## SCI                                      63.38
## Summary   Mean[ICI-ICS] --> 63.31(63.25-63.38)

########### Edad (T)
means(data,data$edad,data$grupo)
## 
##                       grupo = C           grupo = I
## n                            19                  16
## Mean                      62.68               64.06
## Median                       61                  63
## Sd                         7.09                5.45
## Min                          54                  56
## Max                          77                  74
## Range                        23                  18
## Q1                           58                  60
## Q3                         67.5                  68
## Iqr                         9.5                   8
## Normal                    0.127               0.179
## IIC                       62.58               63.98
## ICS                       62.79               64.15
## Summary2    62.68 (62.58-62.79) 64.06 (63.98-64.15)
## Summary           Mean[ICI-ICS]                    
## Groups            Homocedastics                    
## Normality                   Yes                    
## Differences                  No                    
## p-value                    0.53                    
## Method        t-Student(Pooled)

means(data,data$duracion,data$grupo)
## 
##                  grupo = C grupo = I
## n                       19        16
## Mean                  5.89      6.38
## Median                   6         6
## Sd                    0.88      1.41
## Min                      5         4
## Max                      8         8
## Range                    3         4
## Q1                       5         5
## Q3                       6         8
## Iqr                      1         3
## Normal               0.004     0.008
## IIC                   5.88      6.35
## ICS                   5.91       6.4
## Summary2           6 (5-6)   6 (5-8)
## Summary      Median[Q1-Q3]          
## Groups       Homocedastics          
## Normality               No          
## Differences             No          
## p-value              0.331          
## Method      Kruskal-Wallis

freq(data,data$edad)

## 
##         absolute relative cumulative  ici   ics
## 54             2     5.71       5.71  0.7 19.16
## 55             2     5.71      11.43  0.7 19.16
## 56             1     2.86      14.29 0.07 14.92
## 58             4    11.43      25.71  3.2 26.74
## 59             1     2.86      28.57 0.07 14.92
## 60             3     8.57      37.14  1.8 23.06
## 61             5    14.29      51.43 4.81 30.26
## 62             1     2.86      54.29 0.07 14.92
## 63             2     5.71         60  0.7 19.16
## 64             2     5.71      65.71  0.7 19.16
## 66             1     2.86      68.57 0.07 14.92
## 67             1     2.86      71.43 0.07 14.92
## 68             3     8.57         80  1.8 23.06
## 71             1     2.86      82.86 0.07 14.92
## 72             2     5.71      88.57  0.7 19.16
## 73             1     2.86      91.43 0.07 14.92
## 74             2     5.71      97.14  0.7 19.16
## 77             1     2.86        100 0.07 14.92
## Missing        0        0     100.00    0    10
## Total         35   100.00
freq(data,data$grupo)

## 
##         absolute relative cumulative   ici   ics
## C             19    54.29      54.29 36.65 71.17
## I             16    45.71        100 28.83 63.35
## Missing        0        0     100.00     0    10
## Total         35   100.00
########### Sexo (T)
labelsexo=c("Hombres","Mujeres")
labelgrupo=c("Control","Intervencion")
freq(data,data$sexo,labelsexo)

## 
##         absolute relative cumulative   ici   ics
## Hombres       13    37.14      37.14 21.47 55.08
## Mujeres       22    62.86        100 44.92 78.53
## Missing        0        0     100.00     0    10
## Total         35   100.00
tables(data,data$sexo,data$grupo,labelsexo,labelgrupo)
## 
##          grupo
## sexo      Control Intervencion Sum
##   Hombres       7            6  13
##   Mujeres      12           10  22
##   Sum          19           16  35
## 
## by Row (%)
##         Control Intervencion
## Hombres   53.84        46.15
## Mujeres   54.54        45.45
##           54.28        45.71
## 
## by Col (%)
##         Control Intervencion      
## Hombres   36.84         37.5 37.14
## Mujeres   63.15         62.5 62.85
## 
## Chi2 Pearson  p = 0.968

freq(data,data$escolaridad)

## 
##         absolute relative cumulative   ici   ics
## 1             19    54.29      54.29 36.65 71.17
## 2             16    45.71        100 28.83 63.35
## Missing        0        0     100.00     0    10
## Total         35   100.00
tables(data,data$escolaridad,data$grupo,c(1,2),labelgrupo)
## 
##            grupo
## escolaridad Control Intervencion Sum
##         1        10            9  19
##         2         9            7  16
##         Sum      19           16  35
## 
## by Row (%)
##   Control Intervencion
## 1   52.63        47.36
## 2   56.25        43.75
##     54.28        45.71
## 
## by Col (%)
##   Control Intervencion      
## 1   52.63        56.25 54.28
## 2   47.36        43.75 45.71
## 
## Chi2 Pearson  p = 0.83

########### IMC (T)
means(data,data$IMC_pre,data$grupo)
## 
##                       grupo = C           grupo = I
## n                            19                  16
## Mean                      32.55                32.9
## Median                    31.07               32.68
## Sd                         3.08                1.84
## Min                       29.62                29.3
## Max                       39.06               35.69
## Range                      9.45                 6.4
## Q1                        30.15               31.76
## Q3                        35.03               34.22
## Iqr                        4.88                2.46
## Normal                    0.003               0.837
## IIC                        32.5               32.87
## ICS                       32.59               32.93
## Summary2    31.07 (30.15-35.03) 32.68 (31.76-34.22)
## Summary           Median[Q1-Q3]                    
## Groups          Heteroscedastic                    
## Normality                    No                    
## Differences                  No                    
## p-value                   0.301                    
## Method                 Wilcoxon

matched_means(control,control$IMC_pre,control$IMC_post)
## 
##                                        IMC_pre IMC_post
## n                                           19       19
## Mean                                     32.55    32.47
## Median                                   31.07    31.59
## Sd                                        3.08     3.78
## Min                                      29.62    24.62
## Max                                      39.06    39.45
## Range                                     9.45    14.83
## Q1                                       30.15       30
## Q3                                       35.03    35.03
## Iqr                                       4.88     5.04
## Normal                                   0.003    0.615
## IIC                                       32.5    32.41
## ICS                                      32.59    32.52
## Summary     Median[Q1-Q3] 31.59 ( 30 - 35.03 )         
## Groups                           Homocedastics         
## Normality                                   No         
## Differences                                 No         
## p-value                                  0.758         
## Method                                Wilcoxon

matched_means(intervencion,intervencion$IMC_pre,intervencion$IMC_post)
## 
##                                           IMC_pre IMC_post
## n                                              16       16
## Mean                                         32.9    31.09
## Median                                      32.68    31.38
## Sd                                           1.84     3.24
## Min                                          29.3    22.77
## Max                                         35.69    37.78
## Range                                         6.4       15
## Q1                                          31.76    29.62
## Q3                                          34.22    33.27
## Iqr                                          2.46     3.65
## Normal                                      0.837    0.248
## IIC                                         32.87    31.04
## ICS                                         32.93    31.14
## Summary     Median[Q1-Q3] 31.38 ( 29.62 - 33.27 )         
## Groups                            Heteroscedastic         
## Normality                                     Yes         
## Differences                                   Yes         
## p-value                                     0.045         
## Method                    t-Student(Satterhwaite)

means(data,data$IMC_post,data$grupo)
## 
##                       grupo = C           grupo = I
## n                            19                  16
## Mean                      32.47               31.09
## Median                    31.59               31.38
## Sd                         3.78                3.24
## Min                       24.62               22.77
## Max                       39.45               37.78
## Range                     14.83                  15
## Q1                           30               29.62
## Q3                        35.03               33.27
## Iqr                        5.04                3.65
## Normal                    0.615               0.248
## IIC                       32.41               31.04
## ICS                       32.52               31.14
## Summary2    32.47 (32.41-32.52) 31.09 (31.04-31.14)
## Summary           Mean[ICI-ICS]                    
## Groups            Homocedastics                    
## Normality                   Yes                    
## Differences                  No                    
## p-value                   0.261                    
## Method        t-Student(Pooled)

########### Cintura (T)
###########  a) Hombres
means(hombres,hombres$Cintura_pre,hombres$grupo)
## 
##                          grupo = C              grupo = I
## n                                7                      6
## Mean                        116.43                 115.33
## Median                         118                  116.5
## Sd                            7.28                   3.56
## Min                            104                    110
## Max                            126                    119
## Range                           22                      9
## Q1                           113.5                    113
## Q3                             120                 117.75
## Iqr                            6.5                   4.75
## Normal                        0.68                  0.387
## IIC                         116.25                 115.24
## ICS                         116.61                 115.43
## Summary2    116.43 (116.25-116.61) 115.33 (115.24-115.43)
## Summary              Mean[ICI-ICS]                       
## Groups               Homocedastics                       
## Normality                      Yes                       
## Differences                     No                       
## p-value                      0.744                       
## Method           t-Student(Pooled)

###########  b) Mujeres
means(mujeres,mujeres$Cintura_pre,mujeres$grupo)
## 
##                          grupo = C             grupo = I
## n                               12                    10
## Mean                        105.08                 107.8
## Median                         108                 105.5
## Sd                            9.04                  8.07
## Min                             90                    99
## Max                            115                   126
## Range                           25                    27
## Q1                              99                   103
## Q3                             112                112.25
## Iqr                             13                  9.25
## Normal                       0.097                 0.163
## IIC                         104.92                107.64
## ICS                         105.25                107.96
## Summary2    105.08 (104.92-105.25) 107.8 (107.64-107.96)
## Summary              Mean[ICI-ICS]                      
## Groups               Homocedastics                      
## Normality                      Yes                      
## Differences                     No                      
## p-value                       0.47                      
## Method           t-Student(Pooled)

########### Cadera (T)
###########  a) Hombres
means(hombres,hombres$Cadera_pre,hombres$grupo)
## 
##                          grupo = C              grupo = I
## n                                7                      6
## Mean                        110.43                 105.33
## Median                         112                  105.5
## Sd                            8.24                    3.2
## Min                            100                    100
## Max                            121                    109
## Range                           21                      9
## Q1                             104                 104.25
## Q3                             116                  107.5
## Iqr                             12                   3.25
## Normal                       0.484                  0.772
## IIC                         110.22                 105.25
## ICS                         110.63                 105.42
## Summary2    110.43 (110.22-110.63) 105.33 (105.25-105.42)
## Summary              Mean[ICI-ICS]                       
## Groups               Homocedastics                       
## Normality                      Yes                       
## Differences                     No                       
## p-value                      0.184                       
## Method           t-Student(Pooled)

########### -b) Mujeres
means(mujeres,mujeres$Cadera_pre,mujeres$grupo)
## 
##                         grupo = C             grupo = I
## n                              12                    10
## Mean                       106.88                 111.7
## Median                      105.5                 111.5
## Sd                           9.44                  5.98
## Min                            95                   103
## Max                         124.5                   123
## Range                        29.5                    20
## Q1                            100                108.25
## Q3                            114                 114.5
## Iqr                            14                  6.25
## Normal                      0.486                 0.974
## IIC                         106.7                111.58
## ICS                        107.05                111.82
## Summary2    106.88 (106.7-107.05) 111.7 (111.58-111.82)
## Summary             Mean[ICI-ICS]                      
## Groups              Homocedastics                      
## Normality                     Yes                      
## Differences                    No                      
## p-value                     0.178                      
## Method          t-Student(Pooled)

########### C/C    (T)
########### a) Hombres
means(hombres,hombres$cc_pre,hombres$grupo)
## 
##                     grupo = C      grupo = I
## n                           7              6
## Mean                     1.06            1.1
## Median                   1.05           1.09
## Sd                       0.07           0.06
## Min                      0.96           1.03
## Max                      1.19           1.19
## Range                    0.23           0.16
## Q1                       1.01           1.06
## Q3                       1.08           1.12
## Iqr                      0.07           0.05
## Normal                  0.859          0.859
## IIC                      1.06           1.09
## ICS                      1.06            1.1
## Summary2     1.06 (1.06-1.06) 1.1 (1.09-1.1)
## Summary         Mean[ICI-ICS]               
## Groups          Homocedastics               
## Normality                 Yes               
## Differences                No               
## p-value                 0.316               
## Method      t-Student(Pooled)

########### b) Mujeres
means(mujeres,mujeres$cc_pre,mujeres$grupo)
## 
##                           grupo = C     grupo = I
## n                                12            10
## Mean                           0.99          0.97
## Median                         0.97          0.96
## Sd                             0.11          0.05
## Min                            0.86           0.9
## Max                            1.21          1.05
## Range                          0.35          0.15
## Q1                              0.9          0.95
## Q3                             1.06             1
## Iqr                            0.16          0.05
## Normal                        0.386         0.734
## IIC                            0.99          0.96
## ICS                            0.99          0.97
## Summary2            0.97 (0.9-1.06) 0.96 (0.95-1)
## Summary               Median[Q1-Q3]              
## Groups              Heteroscedastic              
## Normality                       Yes              
## Differences                      No              
## p-value                       0.516              
## Method      t-Student(Satterhwaite)

########### HbA1c (T)
means(data,data$HbA1c_pre,data$grupo)
## 
##                     grupo = C        grupo = I
## n                          19               16
## Mean                     6.98             7.21
## Median                    6.5             6.95
## Sd                       1.13              1.3
## Min                       5.3              4.9
## Max                         9              9.2
## Range                     3.7              4.3
## Q1                       6.15             6.38
## Q3                        7.8              8.5
## Iqr                      1.65             2.12
## Normal                  0.105            0.528
## IIC                      6.96             7.19
## ICS                         7             7.23
## Summary2        6.98 (6.96-7) 7.21 (7.19-7.23)
## Summary         Mean[ICI-ICS]                 
## Groups          Homocedastics                 
## Normality                 Yes                 
## Differences                No                 
## p-value                 0.574                 
## Method      t-Student(Pooled)

matched_means(control,control$HbA1c_pre,control$HbA1c_post)
## 
##                                      HbA1c_pre HbA1c_post
## n                                           19         19
## Mean                                      6.98       7.14
## Median                                     6.5          7
## Sd                                        1.13       1.04
## Min                                        5.3        5.8
## Max                                          9          9
## Range                                      3.7        3.2
## Q1                                        6.15        6.3
## Q3                                         7.8       7.75
## Iqr                                       1.65       1.45
## Normal                                   0.105      0.053
## IIC                                       6.96       7.13
## ICS                                          7       7.16
## Summary     Mean[ICI-ICS] 7.14 ( 7.13 - 7.16 )           
## Groups                           Homocedastics           
## Normality                                  Yes           
## Differences                                 No           
## p-value                                  0.348           
## Method                       t-Student(Pooled)

matched_means(intervencion,intervencion$HbA1c_pre,intervencion$HbA1c_post)
## 
##                                      HbA1c_pre HbA1c_post
## n                                           16         16
## Mean                                      7.21       6.67
## Median                                    6.95        6.4
## Sd                                         1.3       0.95
## Min                                        4.9        5.2
## Max                                        9.2        8.5
## Range                                      4.3        3.3
## Q1                                        6.38        6.1
## Q3                                         8.5       7.35
## Iqr                                       2.12       1.25
## Normal                                   0.528      0.406
## IIC                                       7.19       6.65
## ICS                                       7.23       6.68
## Summary     Mean[ICI-ICS] 6.67 ( 6.65 - 6.68 )           
## Groups                           Homocedastics           
## Normality                                  Yes           
## Differences                                Yes           
## p-value                                  0.035           
## Method                       t-Student(Pooled)

means(data,data$HbA1c_post,data$grupo)
## 
##                     grupo = C        grupo = I
## n                          19               16
## Mean                     7.14             6.67
## Median                      7              6.4
## Sd                       1.04             0.95
## Min                       5.8              5.2
## Max                         9              8.5
## Range                     3.2              3.3
## Q1                        6.3              6.1
## Q3                       7.75             7.35
## Iqr                      1.45             1.25
## Normal                  0.053            0.406
## IIC                      7.13             6.65
## ICS                      7.16             6.68
## Summary2     7.14 (7.13-7.16) 6.67 (6.65-6.68)
## Summary         Mean[ICI-ICS]                 
## Groups          Homocedastics                 
## Normality                 Yes                 
## Differences                No                 
## p-value                 0.173                 
## Method      t-Student(Pooled)

########### CT (T)
means(data,data$CT_pre,data$grupo)
## 
##                          grupo = C              grupo = I
## n                               19                     16
## Mean                        190.42                 199.31
## Median                         192                    195
## Sd                           35.36                  43.64
## Min                            131                    141
## Max                            257                  281.2
## Range                          126                  140.2
## Q1                           160.5                 160.05
## Q3                           216.5                    224
## Iqr                             56                  63.95
## Normal                       0.494                  0.391
## IIC                         189.91                 198.62
## ICS                         190.94                 200.01
## Summary2    190.42 (189.91-190.94) 199.31 (198.62-200.01)
## Summary              Mean[ICI-ICS]                       
## Groups               Homocedastics                       
## Normality                      Yes                       
## Differences                     No                       
## p-value                       0.51                       
## Method           t-Student(Pooled)

matched_means(control,control$CT_pre,control$CT_post)
## 
##                                               CT_pre CT_post
## n                                                 19      19
## Mean                                          190.42  195.17
## Median                                           192     188
## Sd                                             35.36   44.12
## Min                                              131   122.8
## Max                                              257     278
## Range                                            126   155.2
## Q1                                             160.5   162.5
## Q3                                             216.5     224
## Iqr                                               56    61.5
## Normal                                         0.494   0.857
## IIC                                           189.91  194.52
## ICS                                           190.94  195.81
## Summary     Mean[ICI-ICS] 195.17 ( 194.52 - 195.81 )        
## Groups                                 Homocedastics        
## Normality                                        Yes        
## Differences                                       No        
## p-value                                        0.465        
## Method                             t-Student(Pooled)

matched_means(intervencion,intervencion$CT_pre,intervencion$CT_post)
## 
##                                           CT_pre CT_post
## n                                             16      16
## Mean                                      199.31  167.94
## Median                                       195     170
## Sd                                         43.64   24.94
## Min                                          141   116.8
## Max                                        281.2   206.8
## Range                                      140.2      90
## Q1                                        160.05   149.2
## Q3                                           224  179.65
## Iqr                                        63.95   30.45
## Normal                                     0.391   0.814
## IIC                                       198.62  167.54
## ICS                                       200.01  168.34
## Summary     Median[Q1-Q3] 170 ( 149.2 - 179.65 )        
## Groups                           Heteroscedastic        
## Normality                                    Yes        
## Differences                                  Yes        
## p-value                                    0.001        
## Method                   t-Student(Satterhwaite)

means(data,data$CT_post,data$grupo)
## 
##                           grupo = C          grupo = I
## n                                19                 16
## Mean                         195.17             167.94
## Median                          188                170
## Sd                            44.12              24.94
## Min                           122.8              116.8
## Max                             278              206.8
## Range                         155.2                 90
## Q1                            162.5              149.2
## Q3                              224             179.65
## Iqr                            61.5              30.45
## Normal                        0.857              0.814
## IIC                          194.52             167.54
## ICS                          195.81             168.34
## Summary2            188 (162.5-224) 170 (149.2-179.65)
## Summary               Median[Q1-Q3]                   
## Groups              Heteroscedastic                   
## Normality                       Yes                   
## Differences                     Yes                   
## p-value                       0.029                   
## Method      t-Student(Satterhwaite)

########### NoHDL (T)
means(data,data$NoHDL_pre,data$grupo)
## 
##                          grupo = C             grupo = I
## n                               19                    16
## Mean                        148.63                 135.5
## Median                         144                 133.5
## Sd                           35.15                 46.35
## Min                             95                    75
## Max                            209                   218
## Range                          114                   143
## Q1                             119                103.25
## Q3                           174.5                154.75
## Iqr                           55.5                  51.5
## Normal                       0.377                   0.3
## IIC                         148.12                134.76
## ICS                         149.14                136.24
## Summary2    148.63 (148.12-149.14) 135.5 (134.76-136.24)
## Summary              Mean[ICI-ICS]                      
## Groups               Homocedastics                      
## Normality                      Yes                      
## Differences                     No                      
## p-value                      0.348                      
## Method           t-Student(Pooled)

matched_means(control,control$NoHDL_pre,control$NoHDL_post)
## 
##                                            NoHDL_pre NoHDL_post
## n                                                 19         19
## Mean                                          148.63     155.06
## Median                                           144        141
## Sd                                             35.15      44.53
## Min                                               95       92.8
## Max                                              209        237
## Range                                            114      144.2
## Q1                                               119      120.5
## Q3                                             174.5      190.2
## Iqr                                             55.5       69.7
## Normal                                         0.377      0.217
## IIC                                           148.12     154.41
## ICS                                           149.14     155.71
## Summary     Mean[ICI-ICS] 155.06 ( 154.41 - 155.71 )           
## Groups                                 Homocedastics           
## Normality                                        Yes           
## Differences                                       No           
## p-value                                        0.304           
## Method                             t-Student(Pooled)

matched_means(intervencion,intervencion$NoHDL_pre,intervencion$NoHDL_post)
## 
##                                          NoHDL_pre NoHDL_post
## n                                               16         16
## Mean                                         135.5     117.38
## Median                                       133.5      118.5
## Sd                                           46.35      24.53
## Min                                             75       73.8
## Max                                            218      158.8
## Range                                          143         85
## Q1                                          103.25      104.6
## Q3                                          154.75     135.95
## Iqr                                           51.5      31.35
## Normal                                         0.3      0.815
## IIC                                         134.76     116.98
## ICS                                         136.24     117.77
## Summary     Median[Q1-Q3] 118.5 ( 104.6 - 135.95 )           
## Groups                             Heteroscedastic           
## Normality                                      Yes           
## Differences                                    Yes           
## p-value                                      0.049           
## Method                     t-Student(Satterhwaite)

means(data,data$NoHDL_post,data$grupo)
## 
##                           grupo = C            grupo = I
## n                                19                   16
## Mean                         155.06               117.38
## Median                          141                118.5
## Sd                            44.53                24.53
## Min                            92.8                 73.8
## Max                             237                158.8
## Range                         144.2                   85
## Q1                            120.5                104.6
## Q3                            190.2               135.95
## Iqr                            69.7                31.35
## Normal                        0.217                0.815
## IIC                          154.41               116.98
## ICS                          155.71               117.77
## Summary2          141 (120.5-190.2) 118.5 (104.6-135.95)
## Summary               Median[Q1-Q3]                     
## Groups              Heteroscedastic                     
## Normality                       Yes                     
## Differences                     Yes                     
## p-value                       0.004                     
## Method      t-Student(Satterhwaite)

########### HDL (T)
########### a) Hombres
means(hombres,hombres$HDL_pre,hombres$grupo)
## 
##                       grupo = C           grupo = I
## n                             7                   6
## Mean                      39.14               37.67
## Median                       37                36.5
## Sd                         3.44                5.68
## Min                          36                  30
## Max                          44                  46
## Range                         8                  16
## Q1                         36.5                  35
## Q3                           42                  41
## Iqr                         5.5                   6
## Normal                    0.081                 0.9
## IIC                       39.06               37.51
## ICS                       39.23               37.82
## Summary2    39.14 (39.06-39.23) 37.67 (37.51-37.82)
## Summary           Mean[ICI-ICS]                    
## Groups            Homocedastics                    
## Normality                   Yes                    
## Differences                  No                    
## p-value                   0.575                    
## Method        t-Student(Pooled)

matched_means(control_hombres,control_hombres$HDL_pre,control_hombres$HDL_post)
## 
##                                          HDL_pre HDL_post
## n                                              7        7
## Mean                                       39.14    36.29
## Median                                        37       36
## Sd                                          3.44     3.64
## Min                                           36       30
## Max                                           44       41
## Range                                          8       11
## Q1                                          36.5       35
## Q3                                            42     38.5
## Iqr                                          5.5      3.5
## Normal                                     0.081     0.66
## IIC                                        39.06     36.2
## ICS                                        39.23    36.38
## Summary     Mean[ICI-ICS] 36.29 ( 36.2 - 36.38 )         
## Groups                             Homocedastics         
## Normality                                    Yes         
## Differences                                   No         
## p-value                                    0.202         
## Method                         t-Student(Pooled)

matched_means(intervencion_hombres,intervencion_hombres$HDL_pre,intervencion_hombres$HDL_post)
## 
##                                           HDL_pre HDL_post
## n                                               6        6
## Mean                                        37.67    41.33
## Median                                       36.5       41
## Sd                                           5.68     4.32
## Min                                            30       36
## Max                                            46       47
## Range                                          16       11
## Q1                                             35    38.25
## Q3                                             41     44.5
## Iqr                                             6     6.25
## Normal                                        0.9    0.698
## IIC                                         37.51    41.22
## ICS                                         37.82    41.45
## Summary     Mean[ICI-ICS] 41.33 ( 41.22 - 41.45 )         
## Groups                              Homocedastics         
## Normality                                     Yes         
## Differences                                   Yes         
## p-value                                     0.016         
## Method                          t-Student(Pooled)

means(hombres,hombres$HDL_post,hombres$grupo)
## 
##                      grupo = C           grupo = I
## n                            7                   6
## Mean                     36.29               41.33
## Median                      36                  41
## Sd                        3.64                4.32
## Min                         30                  36
## Max                         41                  47
## Range                       11                  11
## Q1                          35               38.25
## Q3                        38.5                44.5
## Iqr                        3.5                6.25
## Normal                    0.66               0.698
## IIC                       36.2               41.22
## ICS                      36.38               41.45
## Summary2    36.29 (36.2-36.38) 41.33 (41.22-41.45)
## Summary          Mean[ICI-ICS]                    
## Groups           Homocedastics                    
## Normality                  Yes                    
## Differences                Yes                    
## p-value                  0.043                    
## Method       t-Student(Pooled)

########### b) Mujeres
means(mujeres,mujeres$HDL_pre,mujeres$grupo)
## 
##                           grupo = C         grupo = I
## n                                12                10
## Mean                             45              50.3
## Median                         46.5              50.5
## Sd                             9.49              4.03
## Min                              28                44
## Max                              63                56
## Range                            35                12
## Q1                            38.25             47.25
## Q3                            50.25              53.5
## Iqr                              12              6.25
## Normal                        0.997             0.847
## IIC                           44.82             50.22
## ICS                           45.18             50.38
## Summary2         46.5 (38.25-50.25) 50.5 (47.25-53.5)
## Summary               Median[Q1-Q3]                  
## Groups              Heteroscedastic                  
## Normality                       Yes                  
## Differences                      No                  
## p-value                       0.099                  
## Method      t-Student(Satterhwaite)

matched_means(control_mujeres,control_mujeres$HDL_pre,control_mujeres$HDL_post)
## 
##                                           HDL_pre HDL_post
## n                                              12       12
## Mean                                           45    42.33
## Median                                       46.5       42
## Sd                                           9.49    10.16
## Min                                            28       24
## Max                                            63       59
## Range                                          35       35
## Q1                                          38.25     37.5
## Q3                                          50.25     48.5
## Iqr                                            12       11
## Normal                                      0.997    0.991
## IIC                                         44.82    42.15
## ICS                                         45.18    42.52
## Summary     Mean[ICI-ICS] 42.33 ( 42.15 - 42.52 )         
## Groups                              Homocedastics         
## Normality                                     Yes         
## Differences                                    No         
## p-value                                     0.096         
## Method                          t-Student(Pooled)

matched_means(intervencion_mujeres,intervencion_mujeres$HDL_pre,intervencion_mujeres$HDL_post)
## 
##                                          HDL_pre HDL_post
## n                                             10       10
## Mean                                        50.3     56.1
## Median                                      50.5       56
## Sd                                          4.03     7.34
## Min                                           44       44
## Max                                           56       66
## Range                                         12       22
## Q1                                         47.25    51.25
## Q3                                          53.5       62
## Iqr                                         6.25    10.75
## Normal                                     0.847    0.677
## IIC                                        50.22    55.95
## ICS                                        50.38    56.25
## Summary     Mean[ICI-ICS] 56.1 ( 55.95 - 56.25 )         
## Groups                             Homocedastics         
## Normality                                    Yes         
## Differences                                  Yes         
## p-value                                    0.002         
## Method                         t-Student(Pooled)

means(mujeres,mujeres$HDL_post,mujeres$grupo)
## 
##                       grupo = C          grupo = I
## n                            12                 10
## Mean                      42.33               56.1
## Median                       42                 56
## Sd                        10.16               7.34
## Min                          24                 44
## Max                          59                 66
## Range                        35                 22
## Q1                         37.5              51.25
## Q3                         48.5                 62
## Iqr                          11              10.75
## Normal                    0.991              0.677
## IIC                       42.15              55.95
## ICS                       42.52              56.25
## Summary2    42.33 (42.15-42.52) 56.1 (55.95-56.25)
## Summary           Mean[ICI-ICS]                   
## Groups            Homocedastics                   
## Normality                   Yes                   
## Differences                 Yes                   
## p-value                   0.002                   
## Method        t-Student(Pooled)

########### TG (T)
means(data,data$TG_pre,data$grupo)
## 
##                          grupo = C           grupo = I
## n                               19                  16
## Mean                        167.11                 163
## Median                         194               154.5
## Sd                           59.67               51.57
## Min                             76                  93
## Max                            257                 285
## Range                          181                 192
## Q1                             119                 127
## Q3                             212                 187
## Iqr                             93                  60
## Normal                       0.066               0.438
## IIC                         166.23              162.18
## ICS                         167.98              163.82
## Summary2    167.11 (166.23-167.98) 163 (162.18-163.82)
## Summary              Mean[ICI-ICS]                    
## Groups               Homocedastics                    
## Normality                      Yes                    
## Differences                     No                    
## p-value                      0.831                    
## Method           t-Student(Pooled)

matched_means(control,control$TG_pre,control$TG_post)
## 
##                                               TG_pre TG_post
## n                                                 19      19
## Mean                                          167.11  169.63
## Median                                           194     180
## Sd                                             59.67   60.03
## Min                                               76      73
## Max                                              257     267
## Range                                            181     194
## Q1                                               119     117
## Q3                                               212     213
## Iqr                                               93      96
## Normal                                         0.066   0.279
## IIC                                           166.23  168.76
## ICS                                           167.98  170.51
## Summary     Mean[ICI-ICS] 169.63 ( 168.76 - 170.51 )        
## Groups                                 Homocedastics        
## Normality                                        Yes        
## Differences                                       No        
## p-value                                        0.672        
## Method                             t-Student(Pooled)

matched_means(intervencion,intervencion$TG_pre,intervencion$TG_post)
## 
##                                               TG_pre TG_post
## n                                                 16      16
## Mean                                             163  131.88
## Median                                         154.5     121
## Sd                                             51.57   32.16
## Min                                               93      84
## Max                                              285     187
## Range                                            192     103
## Q1                                               127  108.75
## Q3                                               187  158.75
## Iqr                                               60      50
## Normal                                         0.438    0.39
## IIC                                           162.18  131.36
## ICS                                           163.82  132.39
## Summary     Mean[ICI-ICS] 131.88 ( 131.36 - 132.39 )        
## Groups                                 Homocedastics        
## Normality                                        Yes        
## Differences                                      Yes        
## p-value                                        0.015        
## Method                             t-Student(Pooled)

means(data,data$TG_post,data$grupo)
## 
##                           grupo = C           grupo = I
## n                                19                  16
## Mean                         169.63              131.88
## Median                          180                 121
## Sd                            60.03               32.16
## Min                              73                  84
## Max                             267                 187
## Range                           194                 103
## Q1                              117              108.75
## Q3                              213              158.75
## Iqr                              96                  50
## Normal                        0.279                0.39
## IIC                          168.76              131.36
## ICS                          170.51              132.39
## Summary2              180 (117-213) 121 (108.75-158.75)
## Summary               Median[Q1-Q3]                    
## Groups              Heteroscedastic                    
## Normality                       Yes                    
## Differences                     Yes                    
## p-value                       0.025                    
## Method      t-Student(Satterhwaite)

########### VAI (T)
means(data,data$vai_pre,data$grupo)
## 
##                     grupo = C       grupo = I
## n                          19              16
## Mean                     3.72            3.33
## Median                   3.51            3.12
## Sd                       1.91            1.34
## Min                      1.38             1.9
## Max                      8.66            6.22
## Range                    7.28            4.32
## Q1                       2.03             2.1
## Q3                       5.01            3.96
## Iqr                      2.97            1.86
## Normal                  0.077           0.102
## IIC                      3.69             3.3
## ICS                      3.75            3.35
## Summary2     3.72 (3.69-3.75) 3.33 (3.3-3.35)
## Summary         Mean[ICI-ICS]                
## Groups          Homocedastics                
## Normality                 Yes                
## Differences                No                
## p-value                 0.495                
## Method      t-Student(Pooled)
abline(h=1.95)

means(data,data$vai_pre,data$sexo)
## 
##                     sexo = 1         sexo = 2
## n                         13               22
## Mean                     4.2             3.15
## Median                  4.66             2.75
## Sd                      1.48             1.67
## Min                     1.87             1.38
## Max                     6.22             8.66
## Range                   4.35             7.28
## Q1                      2.75             1.94
## Q3                      5.32             3.72
## Iqr                     2.57             1.78
## Normal                 0.188            0.002
## IIC                     4.17             3.13
## ICS                     4.23             3.17
## Summary2    4.66 (2.75-5.32) 2.75 (1.94-3.72)
## Summary        Median[Q1-Q3]                 
## Groups         Homocedastics                 
## Normality                 No                 
## Differences              Yes                 
## p-value                0.038                 
## Method              Wilcoxon

########### Correlaciones Antropometria
########### hombres
r1=lm(hombres$IMC_pre~hombres$Cintura_pre)
summary(r1)
## 
## Call:
## lm(formula = hombres$IMC_pre ~ hombres$Cintura_pre)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.0575 -0.5754 -0.4571  1.1341  3.7927 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)  
## (Intercept)         -1.98080   11.35174  -0.174   0.8646  
## hombres$Cintura_pre  0.29514    0.09782   3.017   0.0117 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.919 on 11 degrees of freedom
## Multiple R-squared:  0.4528, Adjusted R-squared:  0.4031 
## F-statistic: 9.104 on 1 and 11 DF,  p-value: 0.01171
plot(hombres$IMC_pre~hombres$Cintura_pre)
abline(r1)

r2=lm(hombres$IMC_pre~hombres$Cadera_pre)
summary(r2)
## 
## Call:
## lm(formula = hombres$IMC_pre ~ hombres$Cadera_pre)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.2507 -0.9320  0.0399  0.6955  4.0772 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)   
## (Intercept)         2.93913    8.18806   0.359  0.72642   
## hombres$Cadera_pre  0.27105    0.07563   3.584  0.00429 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.762 on 11 degrees of freedom
## Multiple R-squared:  0.5387, Adjusted R-squared:  0.4968 
## F-statistic: 12.85 on 1 and 11 DF,  p-value: 0.004288
plot(hombres$IMC_pre~hombres$Cadera_pre)
abline(r2)

r3=lm(hombres$IMC_pre~hombres$cc_pre)
summary(r3)
## 
## Call:
## lm(formula = hombres$IMC_pre ~ hombres$cc_pre)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.1516 -1.2490 -0.2841  0.4189  6.7089 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)   
## (Intercept)      40.665     11.809   3.444  0.00549 **
## hombres$cc_pre   -7.842     10.963  -0.715  0.48934   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.536 on 11 degrees of freedom
## Multiple R-squared:  0.04444,    Adjusted R-squared:  -0.04242 
## F-statistic: 0.5116 on 1 and 11 DF,  p-value: 0.4893
plot(hombres$IMC_pre~hombres$cc_pre)
abline(r3)

########### mujeres
r4=lm(mujeres$IMC_pre~mujeres$Cintura_pre)
summary(r4)
## 
## Call:
## lm(formula = mujeres$IMC_pre ~ mujeres$Cintura_pre)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.1282 -1.2732 -0.0941  1.0084  5.0463 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)   
## (Intercept)         13.68420    5.89358   2.322   0.0309 * 
## mujeres$Cintura_pre  0.18154    0.05526   3.285   0.0037 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.158 on 20 degrees of freedom
## Multiple R-squared:  0.3504, Adjusted R-squared:  0.318 
## F-statistic: 10.79 on 1 and 20 DF,  p-value: 0.003703
plot(mujeres$IMC_pre~mujeres$Cadera_pre)
abline(r4)

r5=lm(mujeres$IMC_pre~mujeres$Cadera_pre)
summary(r5)
## 
## Call:
## lm(formula = mujeres$IMC_pre ~ mujeres$Cadera_pre)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.3201 -1.8013  0.0115  1.2302  4.4174 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)        15.91136    6.73091   2.364   0.0283 *
## mujeres$Cadera_pre  0.15654    0.06154   2.543   0.0193 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.327 on 20 degrees of freedom
## Multiple R-squared:  0.2444, Adjusted R-squared:  0.2066 
## F-statistic: 6.469 on 1 and 20 DF,  p-value: 0.01935
plot(mujeres$IMC_pre~mujeres$Cadera_pre)
abline(r5)

r6=lm(mujeres$IMC_pre~mujeres$cc_pre)
summary(r6)
## 
## Call:
## lm(formula = mujeres$IMC_pre ~ mujeres$cc_pre)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.6820 -2.0729  0.3217  1.6034  6.4199 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      28.715      6.540   4.391 0.000282 ***
## mujeres$cc_pre    4.366      6.662   0.655 0.519691    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.649 on 20 degrees of freedom
## Multiple R-squared:  0.02102,    Adjusted R-squared:  -0.02792 
## F-statistic: 0.4295 on 1 and 20 DF,  p-value: 0.5197
plot(mujeres$IMC_pre~mujeres$cc_pre)
abline(r6)

########### Correlaciones Antropometria/Metabolismo

means(data,data$PCR_pre,data$grupo)
## 
##                   grupo = C       grupo = I
## n                        19              16
## Mean                   3.68            3.06
## Median                  2.5            2.15
## Sd                     3.27            2.74
## Min                     0.7             0.7
## Max                    13.1            10.7
## Range                  12.4              10
## Q1                     1.35            1.17
## Q3                     5.05             3.6
## Iqr                     3.7            2.43
## Normal                0.002           0.002
## IIC                    3.63            3.02
## ICS                    3.73            3.11
## Summary2    2.5 (1.35-5.05) 2.15 (1.17-3.6)
## Summary       Median[Q1-Q3]                
## Groups        Homocedastics                
## Normality                No                
## Differences              No                
## p-value               0.476                
## Method       Kruskal-Wallis

matched_means(control,control$PCR_pre,control$PCR_post)
## 
##                                      PCR_pre PCR_post
## n                                         19       19
## Mean                                    3.68     4.36
## Median                                   2.5      2.7
## Sd                                      3.27     3.87
## Min                                      0.7      0.6
## Max                                     13.1     14.1
## Range                                   12.4     13.5
## Q1                                      1.35     1.35
## Q3                                      5.05      7.3
## Iqr                                      3.7     5.95
## Normal                                 0.002    0.007
## IIC                                     3.63     4.31
## ICS                                     3.73     4.42
## Summary     Median[Q1-Q3] 2.7 ( 1.35 - 7.3 )         
## Groups                         Homocedastics         
## Normality                                 No         
## Differences                               No         
## p-value                                 0.07         
## Method                              Wilcoxon

matched_means(intervencion,intervencion$PCR_pre,intervencion$PCR_post)
## 
##                                      PCR_pre PCR_post
## n                                         16       16
## Mean                                    3.06     3.03
## Median                                  2.15      1.9
## Sd                                      2.74     3.01
## Min                                      0.7      0.7
## Max                                     10.7     12.3
## Range                                     10     11.6
## Q1                                      1.17     1.55
## Q3                                       3.6      2.9
## Iqr                                     2.43     1.35
## Normal                                 0.002        0
## IIC                                     3.02     2.98
## ICS                                     3.11     3.08
## Summary     Median[Q1-Q3] 1.9 ( 1.55 - 2.9 )         
## Groups                         Homocedastics         
## Normality                                 No         
## Differences                               No         
## p-value                                0.572         
## Method                              Wilcoxon

means(data,data$IL.6_pre,data$grupo)
## 
##                   grupo = C        grupo = I
## n                        19               16
## Mean                   3.37              4.5
## Median                 3.04             3.39
## Sd                     1.62             3.31
## Min                     1.5              1.5
## Max                     7.4               13
## Range                   5.9             11.5
## Q1                     2.22             2.01
## Q3                      4.2             5.77
## Iqr                    1.98             3.76
## Normal                  0.1            0.008
## IIC                    3.35             4.44
## ICS                     3.4             4.55
## Summary2    3.04 (2.22-4.2) 3.39 (2.01-5.77)
## Summary       Median[Q1-Q3]                 
## Groups      Heteroscedastic                 
## Normality                No                 
## Differences              No                 
## p-value               0.619                 
## Method       Kruskal-Wallis

matched_means(control,control$IL.6_pre,control$IL.6_post)
## 
##                                      IL.6_pre IL.6_post
## n                                          19        19
## Mean                                     3.37      3.82
## Median                                   3.04       3.9
## Sd                                       1.62      1.41
## Min                                       1.5       1.5
## Max                                       7.4         7
## Range                                     5.9       5.5
## Q1                                       2.22      2.87
## Q3                                        4.2      4.82
## Iqr                                      1.98      1.95
## Normal                                    0.1     0.895
## IIC                                      3.35       3.8
## ICS                                       3.4      3.84
## Summary     Mean[ICI-ICS] 3.82 ( 3.8 - 3.84 )          
## Groups                          Homocedastics          
## Normality                                 Yes          
## Differences                                No          
## p-value                                 0.062          
## Method                      t-Student(Pooled)

matched_means(intervencion,intervencion$IL.6_pre,intervencion$IL.6_post)
## 
##                                       IL.6_pre IL.6_post
## n                                           16        16
## Mean                                       4.5      2.94
## Median                                    3.39      2.89
## Sd                                        3.31      0.95
## Min                                        1.5       1.2
## Max                                         13         5
## Range                                     11.5       3.8
## Q1                                        2.01      2.26
## Q3                                        5.77      3.49
## Iqr                                       3.76      1.23
## Normal                                   0.008     0.984
## IIC                                       4.44      2.92
## ICS                                       4.55      2.95
## Summary     Median[Q1-Q3] 2.89 ( 2.26 - 3.49 )          
## Groups                         Heteroscedastic          
## Normality                                   No          
## Differences                                Yes          
## p-value                                  0.044          
## Method                                Wilcoxon

means(data,data$Fibrinogeno_pre,data$grupo)
## 
##                           grupo = C          grupo = I
## n                                19                 16
## Mean                         302.95             341.62
## Median                          325              343.5
## Sd                            79.92              46.42
## Min                             110                270
## Max                             407                432
## Range                           297                162
## Q1                              276             304.25
## Q3                              369                366
## Iqr                              93              61.75
## Normal                        0.088              0.772
## IIC                          301.78             340.88
## ICS                          304.11             342.37
## Summary2              325 (276-369) 343.5 (304.25-366)
## Summary               Median[Q1-Q3]                   
## Groups              Heteroscedastic                   
## Normality                       Yes                   
## Differences                      No                   
## p-value                       0.085                   
## Method      t-Student(Satterhwaite)

matched_means(control,control$Fibrinogeno_pre,control$Fibrinogeno_post)
## 
##                                      Fibrinogeno_pre Fibrinogeno_post
## n                                                 19               19
## Mean                                          302.95           337.79
## Median                                           325              332
## Sd                                             79.92            73.59
## Min                                              110              152
## Max                                              407              466
## Range                                            297              314
## Q1                                               276              307
## Q3                                               369            389.5
## Iqr                                               93             82.5
## Normal                                         0.088            0.306
## IIC                                           301.78           336.72
## ICS                                           304.11           338.86
## Summary     Mean[ICI-ICS] 337.79 ( 336.72 - 338.86 )                 
## Groups                                 Homocedastics                 
## Normality                                        Yes                 
## Differences                                       No                 
## p-value                                        0.079                 
## Method                             t-Student(Pooled)

matched_means(intervencion,intervencion$Fibrinogeno_pre,intervencion$Fibrinogeno_post)
## 
##                                Fibrinogeno_pre Fibrinogeno_post
## n                                           16               16
## Mean                                    341.62           356.06
## Median                                   343.5              356
## Sd                                       46.42            28.37
## Min                                        270              310
## Max                                        432              396
## Range                                      162               86
## Q1                                      304.25           331.75
## Q3                                         366              382
## Iqr                                      61.75            50.25
## Normal                                   0.772            0.025
## IIC                                     340.88           355.61
## ICS                                     342.37           356.51
## Summary     Median[Q1-Q3] 356 ( 331.75 - 382 )                 
## Groups                           Homocedastics                 
## Normality                                   No                 
## Differences                                 No                 
## p-value                                  0.163                 
## Method                                Wilcoxon

means(data,data$edad,data$grupo)
## 
##                       grupo = C           grupo = I
## n                            19                  16
## Mean                      62.68               64.06
## Median                       61                  63
## Sd                         7.09                5.45
## Min                          54                  56
## Max                          77                  74
## Range                        23                  18
## Q1                           58                  60
## Q3                         67.5                  68
## Iqr                         9.5                   8
## Normal                    0.127               0.179
## IIC                       62.58               63.98
## ICS                       62.79               64.15
## Summary2    62.68 (62.58-62.79) 64.06 (63.98-64.15)
## Summary           Mean[ICI-ICS]                    
## Groups            Homocedastics                    
## Normality                   Yes                    
## Differences                  No                    
## p-value                    0.53                    
## Method        t-Student(Pooled)

matched_means(control,control$edad,control$Fibrinogeno_post)
## 
##                                          edad Fibrinogeno_post
## n                                          19               19
## Mean                                    62.68           337.79
## Median                                     61              332
## Sd                                       7.09            73.59
## Min                                        54              152
## Max                                        77              466
## Range                                      23              314
## Q1                                         58              307
## Q3                                       67.5            389.5
## Iqr                                       9.5             82.5
## Normal                                  0.127            0.306
## IIC                                     62.58           336.72
## ICS                                     62.79           338.86
## Summary     Median[Q1-Q3] 332 ( 307 - 389.5 )                 
## Groups                        Heteroscedastic                 
## Normality                                 Yes                 
## Differences                               Yes                 
## p-value                                <0.001                 
## Method                t-Student(Satterhwaite)

means(data,data$ferritina_pre,data$grupo)
## 
##                 grupo = C             grupo = I
## n                      19                    16
## Mean               342.93                333.89
## Median                300                 202.8
## Sd                 240.62                334.38
## Min                  87.7                  26.6
## Max                  1062                  1093
## Range               974.3                1066.4
## Q1                    159                122.15
## Q3                    436                425.82
## Iqr                   277                303.67
## Normal              0.012                 0.002
## IIC                339.42                328.56
## ICS                346.44                339.22
## Summary2    300 (159-436) 202.8 (122.15-425.82)
## Summary     Median[Q1-Q3]                      
## Groups      Homocedastics                      
## Normality              No                      
## Differences            No                      
## p-value             0.422                      
## Method           Wilcoxon

matched_means(control,control$ferritina_pre,control$ferritina_post)
## 
##                                       ferritina_pre ferritina_post
## n                                                19             19
## Mean                                         342.93         317.38
## Median                                          300          287.9
## Sd                                           240.62         193.53
## Min                                            87.7          71.96
## Max                                            1062          810.6
## Range                                         974.3         738.64
## Q1                                              159         168.55
## Q3                                              436         402.45
## Iqr                                             277          233.9
## Normal                                        0.012          0.122
## IIC                                          339.42         314.56
## ICS                                          346.44         320.21
## Summary     Median[Q1-Q3] 287.9 ( 168.55 - 402.45 )               
## Groups                                Homocedastics               
## Normality                                        No               
## Differences                                      No               
## p-value                                       0.062               
## Method                                     Wilcoxon

matched_means(intervencion,intervencion$ferritina_pre,intervencion$ferritina_post)
## 
##                                       ferritina_pre ferritina_post
## n                                                16             16
## Mean                                         333.89         303.86
## Median                                        202.8         178.45
## Sd                                           334.38         307.41
## Min                                            26.6          27.39
## Max                                            1093          978.8
## Range                                        1066.4         951.41
## Q1                                           122.15         126.23
## Q3                                           425.82          391.9
## Iqr                                          303.67         265.67
## Normal                                        0.002          0.002
## IIC                                          328.56         298.96
## ICS                                          339.22         308.76
## Summary     Median[Q1-Q3] 178.45 ( 126.23 - 391.9 )               
## Groups                                Homocedastics               
## Normality                                        No               
## Differences                                     Yes               
## p-value                                       0.015               
## Method                                     Wilcoxon

########### Cognitivo

datac=readexcel(paste(path,"/R_P/datos_cognitivo.xls",sep=""),"Hoja1")
datac$general_pre=(datac$Q1_pre+datac$Q2_pre)/2
datac$general_post=(datac$Q1_post+datac$Q2_post)/2
datac$fisica_pre= (datac$Q3_pre +datac$Q4_pre +datac$Q10_pre +datac$Q15_pre +datac$Q16_pre +datac$Q17_pre +datac$Q18_pre) /7
datac$fisica_post=(datac$Q3_post+datac$Q4_post+datac$Q10_post+datac$Q15_post+datac$Q16_post+datac$Q17_post+datac$Q18_post)/7
datac$sicologico_pre= (datac$Q5_pre +datac$Q6_pre +datac$Q7_pre +datac$Q11_pre +datac$Q19_pre +datac$Q26_pre) /6
datac$sicologico_post=(datac$Q5_post+datac$Q6_post+datac$Q7_post+datac$Q11_post+datac$Q19_post+datac$Q26_post)/6
datac$sociologico_pre= (datac$Q20_pre +datac$Q21_pre +datac$Q22_pre) /3
datac$sociologico_post=(datac$Q20_post+datac$Q21_post+datac$Q22_post)/3
datac$entorno_pre= (datac$Q8_pre +datac$Q9_pre +datac$Q12_pre +datac$Q13_pre +datac$Q14_pre +datac$Q23_pre +datac$Q24_pre+datac$Q25_pre) /8
datac$entorno_post=(datac$Q8_post+datac$Q9_post+datac$Q12_post+datac$Q13_post+datac$Q14_post+datac$Q23_post+datac$Q24_post+datac$Q25_pre)/8
datac$total_pre=(datac$general_pre+datac$fisica_pre+datac$sicologico_pre+datac$sociologico_pre+datac$entorno_pre)/5
datac$total_post=(datac$general_post+datac$fisica_post+datac$sicologico_post+datac$sociologico_post+datac$entorno_post)/5

datac$SL_pre<-datac$E1_pre+datac$E2_pre+datac$E3a_pre+datac$E4_pre+datac$E5_pre+datac$E6_pre+datac$E7a_pre+datac$E8_pre+datac$E9_pre+datac$E10_pre
datac$V_pre<-datac$DT_pre
datac$O_pre<-datac$A_pre
datac$M_pre<-datac$C2b_pre
datac$VLOM_pre=(datac$V_pre+datac$SL_pre)/(datac$O_pre+datac$M_pre)

datac$SL_post<-datac$E1_post+datac$E2_post+datac$E3a_post+datac$E4_post+datac$E5_post+datac$E6_post+datac$E7a_post+datac$E8_post+datac$E9_post+datac$E10_post
datac$V_post<-datac$DT_post
datac$O_post<-datac$A_post
datac$M_post<-datac$C2b_post
datac$VLOM_post=(datac$V_post+datac$SL_post)/(datac$O_post+datac$M_post)

controlc=datac[which(datac$G=="C"),]
intervencionc=datac[which(datac$G=="I"),]

freq(control,control$sexo,labelsexo)

## 
##         absolute relative cumulative   ici   ics
## Hombres        7    36.84      36.84 16.29 61.64
## Mujeres       12    63.16        100 38.36 83.71
## Missing        0        0     100.00     0 17.65
## Total         19   100.00
freq(intervencion,intervencion$sexo,labelsexo)

## 
##         absolute relative cumulative   ici   ics
## Hombres        6     37.5       37.5  15.2 64.57
## Mujeres       10     62.5        100 35.43  84.8
## Missing        0        0     100.00     0 20.59
## Total         16   100.00
tables(data,data$sexo,data$grupo,labelsexo,labelgrupo)
## 
##          grupo
## sexo      Control Intervencion Sum
##   Hombres       7            6  13
##   Mujeres      12           10  22
##   Sum          19           16  35
## 
## by Row (%)
##         Control Intervencion
## Hombres   53.84        46.15
## Mujeres   54.54        45.45
##           54.28        45.71
## 
## by Col (%)
##         Control Intervencion      
## Hombres   36.84         37.5 37.14
## Mujeres   63.15         62.5 62.85
## 
## Chi2 Pearson  p = 0.968

freq(control,control$escolaridad)

## 
##         absolute relative cumulative   ici   ics
## 1             10    52.63      52.63 28.86 75.55
## 2              9    47.37        100 24.45 71.14
## Missing        0        0     100.00     0 17.65
## Total         19   100.00
freq(intervencion,intervencion$escolaridad)

## 
##         absolute relative cumulative   ici   ics
## 1              9    56.25      56.25 29.88 80.25
## 2              7    43.75        100 19.75 70.12
## Missing        0        0     100.00     0 20.59
## Total         16   100.00
tables(data,data$escolaridad,data$grupo,labelsexo,labelgrupo)
## 
##            grupo
## escolaridad Control Intervencion Sum
##     Hombres      10            9  19
##     Mujeres       9            7  16
##     Sum          19           16  35
## 
## by Row (%)
##         Control Intervencion
## Hombres   52.63        47.36
## Mujeres   56.25        43.75
##           54.28        45.71
## 
## by Col (%)
##         Control Intervencion      
## Hombres   52.63        56.25 54.28
## Mujeres   47.36        43.75 45.71
## 
## Chi2 Pearson  p = 0.83

means(datac,datac$MMSE_pre,datac$G)
## 
##                      G = C      G = I
## n                       17         16
## Mean                 28.53      28.81
## Median                  28         29
## Sd                    1.46       1.22
## Min                     25         26
## Max                     30         30
## Range                    5          4
## Q1                      28         28
## Q3                      30         30
## Iqr                      2          2
## Normal               0.006      0.019
## IIC                  28.51      28.79
## ICS                  28.55      28.83
## Summary2        28 (28-30) 29 (28-30)
## Summary      Median[Q1-Q3]           
## Groups       Homocedastics           
## Normality               No           
## Differences             No           
## p-value               0.61           
## Method      Kruskal-Wallis

matched_means(controlc,controlc$MMSE_pre,controlc$MMSE_post)
## 
##                                       MMSE_pre MMSE_post
## n                                           17        14
## Mean                                     28.53     27.93
## Median                                      28        28
## Sd                                        1.46       1.9
## Min                                         25        24
## Max                                         30        30
## Range                                        5         6
## Q1                                          28     26.25
## Q3                                          30     29.75
## Iqr                                          2       3.5
## Normal                                   0.006     0.117
## IIC                                      28.51      27.9
## ICS                                      28.55     27.96
## Summary     Median[Q1-Q3] 28 ( 26.25 - 29.75 )          
## Groups                           Homocedastics          
## Normality                                   No          
## Differences                                 No          
## p-value                                  0.322          
## Method                                Wilcoxon

matched_means(intervencionc,intervencionc$MMSE_pre,intervencionc$MMSE_post)
## 
##                                 MMSE_pre MMSE_post
## n                                     16        15
## Mean                               28.81      28.4
## Median                                29        29
## Sd                                  1.22      0.91
## Min                                   26        27
## Max                                   30        30
## Range                                  4         3
## Q1                                    28        28
## Q3                                    30        29
## Iqr                                    2         1
## Normal                             0.019     0.025
## IIC                                28.79     28.38
## ICS                                28.83     28.42
## Summary     Median[Q1-Q3] 29 ( 28 - 29 )          
## Groups                     Homocedastics          
## Normality                             No          
## Differences                           No          
## p-value                            0.351          
## Method                          Wilcoxon

matched_means(controlc,controlc$TOTALACE_pre,controlc$TOTALACE_post)
## 
##                                      TOTALACE_pre TOTALACE_post
## n                                              17            14
## Mean                                        84.65         84.64
## Median                                         85          85.5
## Sd                                           7.91          7.73
## Min                                            66            73
## Max                                            95            94
## Range                                          29            21
## Q1                                             82         77.25
## Q3                                             90         91.75
## Iqr                                             8          14.5
## Normal                                       0.16         0.115
## IIC                                         84.52         84.51
## ICS                                         84.77         84.77
## Summary     Mean[ICI-ICS] 84.64 ( 84.51 - 84.77 )              
## Groups                              Homocedastics              
## Normality                                     Yes              
## Differences                                    No              
## p-value                                     0.878              
## Method                          t-Student(Pooled)

matched_means(intervencionc,intervencionc$TOTALACE_pre,intervencionc$TOTALACE_post)
## 
##                                      TOTALACE_pre TOTALACE_post
## n                                              16            16
## Mean                                        81.62         88.19
## Median                                       83.5            88
## Sd                                           8.17          5.01
## Min                                            65            80
## Max                                            97            97
## Range                                          32            17
## Q1                                           76.5          85.5
## Q3                                          85.75            92
## Iqr                                          9.25           6.5
## Normal                                       0.98         0.602
## IIC                                         81.49         88.11
## ICS                                         81.76         88.27
## Summary     Mean[ICI-ICS] 88.19 ( 88.11 - 88.27 )              
## Groups                              Homocedastics              
## Normality                                     Yes              
## Differences                                   Yes              
## p-value                                     0.031              
## Method                          t-Student(Pooled)

tables(datac,datac$Esc,datac$G,c(1,2),c("C","I"))
## 
##      G
## Esc    C  I Sum
##   1    8  6  14
##   2    9 10  19
##   Sum 17 16  33
## 
## by Row (%)
##       C     I
## 1 57.14 42.85
## 2 47.36 52.63
##   51.51 48.48
## 
## by Col (%)
##       C    I      
## 1 47.05 37.5 42.42
## 2 52.94 62.5 57.57
## 
## Chi2 Pearson  p = 0.579

means(controlc,controlc$TOTALACE_pre,controlc$Esc)
## 
##                         Esc = 1          Esc = 2
## n                             8                9
## Mean                      85.38               84
## Median                     87.5               84
## Sd                          9.5             6.73
## Min                          66               72
## Max                          95               91
## Range                        29               19
## Q1                         81.5               83
## Q3                        92.25               89
## Iqr                       10.75                6
## Normal                    0.226            0.143
## IIC                       85.16            83.85
## ICS                       85.59            84.15
## Summary2    85.38 (85.16-85.59) 84 (83.85-84.15)
## Summary           Mean[ICI-ICS]                 
## Groups            Homocedastics                 
## Normality                   Yes                 
## Differences                  No                 
## p-value                   0.733                 
## Method        t-Student(Pooled)

means(controlc,controlc$TOTALACE_post,controlc$Esc)
## 
##                         Esc = 1             Esc = 2
## n                             7                   7
## Mean                      83.43               85.86
## Median                       84                  86
## Sd                         8.73                7.06
## Min                          73                  74
## Max                          93                  94
## Range                        20                  20
## Q1                         75.5                  83
## Q3                         91.5                90.5
## Iqr                          16                 7.5
## Normal                    0.124               0.563
## IIC                       83.21               85.68
## ICS                       83.64               86.03
## Summary2    83.43 (83.21-83.64) 85.86 (85.68-86.03)
## Summary           Mean[ICI-ICS]                    
## Groups            Homocedastics                    
## Normality                   Yes                    
## Differences                  No                    
## p-value                   0.578                    
## Method        t-Student(Pooled)

means(intervencionc,intervencionc$TOTALACE_pre,intervencionc$Esc)
## 
##                         Esc = 1            Esc = 2
## n                             6                 10
## Mean                      78.17               83.7
## Median                       79               84.5
## Sd                         8.42               7.69
## Min                          65                 70
## Max                          88                 97
## Range                        23                 27
## Q1                        74.25              78.75
## Q3                        83.75              88.75
## Iqr                         9.5                 10
## Normal                    0.691              0.979
## IIC                       77.94              83.54
## ICS                       78.39              83.86
## Summary2    78.17 (77.94-78.39) 83.7 (83.54-83.86)
## Summary           Mean[ICI-ICS]                   
## Groups            Homocedastics                   
## Normality                   Yes                   
## Differences                  No                   
## p-value                     0.2                   
## Method        t-Student(Pooled)

means(intervencionc,intervencionc$TOTALACE_post,intervencionc$Esc)
## 
##                       Esc = 1            Esc = 2
## n                           6                 10
## Mean                       88               88.3
## Median                     88                 88
## Sd                        4.1                5.7
## Min                        81                 80
## Max                        92                 97
## Range                      11                 17
## Q1                         87               84.5
## Q3                      91.25              92.75
## Iqr                      4.25               8.25
## Normal                  0.325              0.825
## IIC                     87.89              88.18
## ICS                     88.11              88.42
## Summary2     88 (87.89-88.11) 88.3 (88.18-88.42)
## Summary         Mean[ICI-ICS]                   
## Groups          Homocedastics                   
## Normality                 Yes                   
## Differences                No                   
## p-value                 0.912                   
## Method      t-Student(Pooled)

means(datac,datac$TOTALACE_pre,datac$G)
## 
##                           G = C               G = I
## n                            17                  16
## Mean                      84.65               81.62
## Median                       85                83.5
## Sd                         7.91                8.17
## Min                          66                  65
## Max                          95                  97
## Range                        29                  32
## Q1                           82                76.5
## Q3                           90               85.75
## Iqr                           8                9.25
## Normal                     0.16                0.98
## IIC                       84.52               81.49
## ICS                       84.77               81.76
## Summary2    84.65 (84.52-84.77) 81.62 (81.49-81.76)
## Summary           Mean[ICI-ICS]                    
## Groups            Homocedastics                    
## Normality                   Yes                    
## Differences                  No                    
## p-value                   0.289                    
## Method        t-Student(Pooled)

means(intervencionc,intervencionc$TOTALACE_pre,intervencionc$Esc)
## 
##                         Esc = 1            Esc = 2
## n                             6                 10
## Mean                      78.17               83.7
## Median                       79               84.5
## Sd                         8.42               7.69
## Min                          65                 70
## Max                          88                 97
## Range                        23                 27
## Q1                        74.25              78.75
## Q3                        83.75              88.75
## Iqr                         9.5                 10
## Normal                    0.691              0.979
## IIC                       77.94              83.54
## ICS                       78.39              83.86
## Summary2    78.17 (77.94-78.39) 83.7 (83.54-83.86)
## Summary           Mean[ICI-ICS]                   
## Groups            Homocedastics                   
## Normality                   Yes                   
## Differences                  No                   
## p-value                     0.2                   
## Method        t-Student(Pooled)

means(intervencionc,intervencionc$TOTALACE_post,intervencionc$Esc)
## 
##                       Esc = 1            Esc = 2
## n                           6                 10
## Mean                       88               88.3
## Median                     88                 88
## Sd                        4.1                5.7
## Min                        81                 80
## Max                        92                 97
## Range                      11                 17
## Q1                         87               84.5
## Q3                      91.25              92.75
## Iqr                      4.25               8.25
## Normal                  0.325              0.825
## IIC                     87.89              88.18
## ICS                     88.11              88.42
## Summary2     88 (87.89-88.11) 88.3 (88.18-88.42)
## Summary         Mean[ICI-ICS]                   
## Groups          Homocedastics                   
## Normality                 Yes                   
## Differences                No                   
## p-value                 0.912                   
## Method      t-Student(Pooled)

means(datac,datac$YESAVAGE_pre,datac$G)
## 
##                       G = C      G = I
## n                        17         16
## Mean                   2.88       2.69
## Median                    2          3
## Sd                      3.5       1.58
## Min                       0          0
## Max                      13          5
## Range                    13          5
## Q1                        1       1.75
## Q3                        3          4
## Iqr                       2       2.25
## Normal                    0      0.246
## IIC                    2.83       2.66
## ICS                    2.94       2.71
## Summary2            2 (1-3) 3 (1.75-4)
## Summary       Median[Q1-Q3]           
## Groups      Heteroscedastic           
## Normality                No           
## Differences              No           
## p-value               0.313           
## Method       Kruskal-Wallis

matched_means(controlc,controlc$YESAVAGE_pre,controlc$YESAVAGE_post)
## 
##                          YESAVAGE_pre YESAVAGE_post
## n                                  17            14
## Mean                             2.88          2.07
## Median                              2             2
## Sd                                3.5          1.49
## Min                                 0             0
## Max                                13             5
## Range                              13             5
## Q1                                  1             1
## Q3                                  3             3
## Iqr                                 2             2
## Normal                              0         0.351
## IIC                              2.83          2.05
## ICS                              2.94           2.1
## Summary     Median[Q1-Q3] 2 ( 1 - 3 )              
## Groups                Heteroscedastic              
## Normality                          No              
## Differences                        No              
## p-value                         0.843              
## Method                       Wilcoxon

matched_means(intervencionc,intervencionc$YESAVAGE_pre,intervencionc$YESAVAGE_post)
## 
##                          YESAVAGE_pre YESAVAGE_post
## n                                  16            16
## Mean                             2.69          2.75
## Median                              3             2
## Sd                               1.58          2.27
## Min                                 0             0
## Max                                 5             7
## Range                               5             7
## Q1                               1.75             1
## Q3                                  4             4
## Iqr                              2.25             3
## Normal                          0.246         0.016
## IIC                              2.66          2.71
## ICS                              2.71          2.79
## Summary     Median[Q1-Q3] 2 ( 1 - 4 )              
## Groups                  Homocedastics              
## Normality                          No              
## Differences                        No              
## p-value                        >0.999              
## Method                       Wilcoxon

means(datac,datac$TOTALADAS_pre,datac$G)
## 
##                         G = C            G = I
## n                          17               16
## Mean                     7.71             8.69
## Median                      8              8.5
## Sd                       3.51             3.42
## Min                         2                3
## Max                        14               15
## Range                      12               12
## Q1                          5                7
## Q3                         10            10.25
## Iqr                         5             3.25
## Normal                  0.548            0.785
## IIC                      7.65             8.63
## ICS                      7.76             8.74
## Summary2     7.71 (7.65-7.76) 8.69 (8.63-8.74)
## Summary         Mean[ICI-ICS]                 
## Groups          Homocedastics                 
## Normality                 Yes                 
## Differences                No                 
## p-value                 0.423                 
## Method      t-Student(Pooled)

matched_means(controlc,controlc$TOTALADAS_pre,controlc$TOTALADAS_post)
## 
##                                  TOTALADAS_pre TOTALADAS_post
## n                                           17             14
## Mean                                      7.71           7.86
## Median                                       8              5
## Sd                                        3.51           5.07
## Min                                          2              2
## Max                                         14             17
## Range                                       12             15
## Q1                                           5              5
## Q3                                          10          11.75
## Iqr                                          5           6.75
## Normal                                   0.548           0.07
## IIC                                       7.65           7.77
## ICS                                       7.76           7.94
## Summary     Mean[ICI-ICS] 7.86 ( 7.77 - 7.94 )               
## Groups                           Homocedastics               
## Normality                                  Yes               
## Differences                                 No               
## p-value                                  0.966               
## Method                       t-Student(Pooled)

matched_means(intervencionc,intervencionc$TOTALADAS_pre,intervencionc$TOTALADAS_post)
## 
##                               TOTALADAS_pre TOTALADAS_post
## n                                        16             16
## Mean                                   8.69              7
## Median                                  8.5            6.5
## Sd                                     3.42           4.16
## Min                                       3              1
## Max                                      15             16
## Range                                    12             15
## Q1                                        7              4
## Q3                                    10.25            9.5
## Iqr                                    3.25            5.5
## Normal                                0.785          0.481
## IIC                                    8.63           6.93
## ICS                                    8.74           7.07
## Summary     Mean[ICI-ICS] 7 ( 6.93 - 7.07 )               
## Groups                        Homocedastics               
## Normality                               Yes               
## Differences                              No               
## p-value                               0.264               
## Method                    t-Student(Pooled)

means(datac,datac$general_pre,datac$G)
## 
##                      G = C     G = I
## n                       16        14
## Mean                  3.41      3.14
## Median                3.25         3
## Sd                    0.52      0.36
## Min                    2.5       2.5
## Max                      4       3.5
## Range                  1.5         1
## Q1                       3         3
## Q3                       4       3.5
## Iqr                      1       0.5
## Normal               0.003     0.005
## IIC                    3.4      3.14
## ICS                   3.41      3.15
## Summary2        3.25 (3-4) 3 (3-3.5)
## Summary      Median[Q1-Q3]          
## Groups       Homocedastics          
## Normality               No          
## Differences             No          
## p-value              0.187          
## Method      Kruskal-Wallis

matched_means(controlc,controlc$general_pre,controlc$general_post)
## 
##                                general_pre general_post
## n                                       16           14
## Mean                                  3.41         3.71
## Median                                3.25         3.75
## Sd                                    0.52         0.32
## Min                                    2.5            3
## Max                                      4            4
## Range                                  1.5            1
## Q1                                       3          3.5
## Q3                                       4            4
## Iqr                                      1          0.5
## Normal                               0.003        0.002
## IIC                                    3.4         3.71
## ICS                                   3.41         3.72
## Summary     Median[Q1-Q3] 3.75 ( 3.5 - 4 )             
## Groups                       Homocedastics             
## Normality                               No             
## Differences                            Yes             
## p-value                              0.038             
## Method                            Wilcoxon

matched_means(intervencionc,intervencionc$general_pre,intervencionc$general_post)
## 
##                                general_pre general_post
## n                                       14           16
## Mean                                  3.14         3.72
## Median                                   3         3.75
## Sd                                    0.36         0.41
## Min                                    2.5            3
## Max                                    3.5          4.5
## Range                                    1          1.5
## Q1                                       3          3.5
## Q3                                     3.5            4
## Iqr                                    0.5          0.5
## Normal                               0.005         0.03
## IIC                                   3.14         3.71
## ICS                                   3.15         3.73
## Summary     Median[Q1-Q3] 3.75 ( 3.5 - 4 )             
## Groups                       Homocedastics             
## Normality                               No             
## Differences                            Yes             
## p-value                              0.004             
## Method                            Wilcoxon

means(datac,datac$fisica_pre,datac$G)
## 
##                         G = C            G = I
## n                          16               14
## Mean                     3.16             2.97
## Median                   3.14             2.93
## Sd                       0.39             0.33
## Min                      2.29             2.43
## Max                      3.86             3.43
## Range                    1.57                1
## Q1                          3             2.75
## Q3                       3.43             3.14
## Iqr                      0.43             0.39
## Normal                  0.616             0.33
## IIC                      3.15             2.96
## ICS                      3.17             2.98
## Summary2     3.16 (3.15-3.17) 2.97 (2.96-2.98)
## Summary         Mean[ICI-ICS]                 
## Groups          Homocedastics                 
## Normality                 Yes                 
## Differences                No                 
## p-value                  0.16                 
## Method      t-Student(Pooled)

matched_means(controlc,controlc$fisica_pre,controlc$fisica_post)
## 
##                                     fisica_pre fisica_post
## n                                           16          14
## Mean                                      3.16        3.24
## Median                                    3.14        3.29
## Sd                                        0.39        0.28
## Min                                       2.29        2.57
## Max                                       3.86        3.71
## Range                                     1.57        1.14
## Q1                                           3        3.14
## Q3                                        3.43        3.39
## Iqr                                       0.43        0.25
## Normal                                   0.616       0.212
## IIC                                       3.15        3.24
## ICS                                       3.17        3.25
## Summary     Mean[ICI-ICS] 3.24 ( 3.24 - 3.25 )            
## Groups                           Homocedastics            
## Normality                                  Yes            
## Differences                                 No            
## p-value                                  0.439            
## Method                       t-Student(Pooled)

matched_means(intervencionc,intervencionc$fisica_pre,intervencionc$fisica_post)
## 
##                                     fisica_pre fisica_post
## n                                           14          16
## Mean                                      2.97        3.43
## Median                                    2.93         3.5
## Sd                                        0.33        0.28
## Min                                       2.43           3
## Max                                       3.43        3.86
## Range                                        1        0.86
## Q1                                        2.75        3.25
## Q3                                        3.14        3.57
## Iqr                                       0.39        0.32
## Normal                                    0.33       0.269
## IIC                                       2.96        3.42
## ICS                                       2.98        3.43
## Summary     Mean[ICI-ICS] 3.43 ( 3.42 - 3.43 )            
## Groups                           Homocedastics            
## Normality                                  Yes            
## Differences                                Yes            
## p-value                                  0.002            
## Method                       t-Student(Pooled)

means(datac,datac$sicologico_pre,datac$G)
## 
##                         G = C            G = I
## n                          16               14
## Mean                      3.3             3.24
## Median                   3.33             3.33
## Sd                       0.52             0.45
## Min                      2.33             2.67
## Max                      4.17             3.83
## Range                    1.83             1.17
## Q1                          3             2.83
## Q3                       3.67             3.62
## Iqr                      0.67             0.79
## Normal                  0.856            0.067
## IIC                      3.29             3.23
## ICS                      3.31             3.25
## Summary2      3.3 (3.29-3.31) 3.24 (3.23-3.25)
## Summary         Mean[ICI-ICS]                 
## Groups          Homocedastics                 
## Normality                 Yes                 
## Differences                No                 
## p-value                 0.723                 
## Method      t-Student(Pooled)

matched_means(controlc,controlc$sicologico_pre,controlc$sicologico_post)
## 
##                               sicologico_pre sicologico_post
## n                                         16              14
## Mean                                     3.3            3.52
## Median                                  3.33             3.5
## Sd                                      0.52            0.21
## Min                                     2.33            3.17
## Max                                     4.17            3.83
## Range                                   1.83            0.67
## Q1                                         3             3.5
## Q3                                      3.67            3.67
## Iqr                                     0.67            0.17
## Normal                                 0.856           0.133
## IIC                                     3.29            3.52
## ICS                                     3.31            3.53
## Summary     Median[Q1-Q3] 3.5 ( 3.5 - 3.67 )                
## Groups                       Heteroscedastic                
## Normality                                Yes                
## Differences                               No                
## p-value                                 0.16                
## Method               t-Student(Satterhwaite)

matched_means(intervencionc,intervencionc$sicologico_pre,intervencionc$sicologico_post)
## 
##                                 sicologico_pre sicologico_post
## n                                           14              16
## Mean                                      3.24            3.64
## Median                                    3.33            3.67
## Sd                                        0.45            0.33
## Min                                       2.67            3.17
## Max                                       3.83            4.17
## Range                                     1.17               1
## Q1                                        2.83            3.33
## Q3                                        3.62            3.88
## Iqr                                       0.79            0.54
## Normal                                   0.067           0.147
## IIC                                       3.23            3.63
## ICS                                       3.25            3.64
## Summary     Mean[ICI-ICS] 3.64 ( 3.63 - 3.64 )                
## Groups                           Homocedastics                
## Normality                                  Yes                
## Differences                                Yes                
## p-value                                  0.047                
## Method                       t-Student(Pooled)

means(datac,datac$sociologico_pre,datac$G)
## 
##                      G = C            G = I
## n                       16               14
## Mean                   3.9             3.64
## Median                   4             3.67
## Sd                    0.48             0.33
## Min                      3                3
## Max                      5                4
## Range                    2                1
## Q1                    3.67             3.67
## Q3                       4             3.92
## Iqr                   0.33             0.25
## Normal               0.059            0.007
## IIC                   3.89             3.64
## ICS                    3.9             3.65
## Summary2        4 (3.67-4) 3.67 (3.67-3.92)
## Summary      Median[Q1-Q3]                 
## Groups       Homocedastics                 
## Normality               No                 
## Differences             No                 
## p-value              0.066                 
## Method      Kruskal-Wallis

matched_means(controlc,controlc$sociologico_pre,controlc$sociologico_post)
## 
##                               sociologico_pre sociologico_post
## n                                          16               14
## Mean                                      3.9             3.52
## Median                                      4              3.5
## Sd                                       0.48             0.39
## Min                                         3                3
## Max                                         5                4
## Range                                       2                1
## Q1                                       3.67             3.33
## Q3                                          4             3.92
## Iqr                                      0.33             0.58
## Normal                                  0.059            0.039
## IIC                                      3.89             3.52
## ICS                                       3.9             3.53
## Summary     Median[Q1-Q3] 3.5 ( 3.33 - 3.92 )                 
## Groups                          Homocedastics                 
## Normality                                  No                 
## Differences                                No                 
## p-value                                  0.09                 
## Method                               Wilcoxon

matched_means(intervencionc,intervencionc$sociologico_pre,intervencionc$sociologico_post)
## 
##                             sociologico_pre sociologico_post
## n                                        14               16
## Mean                                   3.64              3.9
## Median                                 3.67                4
## Sd                                     0.33             0.48
## Min                                       3                3
## Max                                       4             4.67
## Range                                     1             1.67
## Q1                                     3.67             3.67
## Q3                                     3.92             4.08
## Iqr                                    0.25             0.42
## Normal                                0.007            0.154
## IIC                                    3.64             3.89
## ICS                                    3.65              3.9
## Summary     Median[Q1-Q3] 4 ( 3.67 - 4.08 )                 
## Groups                        Homocedastics                 
## Normality                                No                 
## Differences                              No                 
## p-value                               0.085                 
## Method                             Wilcoxon

means(datac,datac$entorno_pre,datac$G)
## 
##                         G = C          G = I
## n                          16             14
## Mean                     3.63            3.4
## Median                   3.62           3.38
## Sd                        0.4           0.38
## Min                      2.75           2.62
## Max                      4.25           4.12
## Range                     1.5            1.5
## Q1                       3.38           3.25
## Q3                       3.88           3.59
## Iqr                       0.5           0.34
## Normal                  0.626          0.824
## IIC                      3.63            3.4
## ICS                      3.64           3.41
## Summary2     3.63 (3.63-3.64) 3.4 (3.4-3.41)
## Summary         Mean[ICI-ICS]               
## Groups          Homocedastics               
## Normality                 Yes               
## Differences                No               
## p-value                 0.118               
## Method      t-Student(Pooled)

matched_means(controlc,controlc$entorno_pre,controlc$entorno_post)
## 
##                                    entorno_pre entorno_post
## n                                           16           13
## Mean                                      3.63         3.79
## Median                                    3.62         3.88
## Sd                                         0.4         0.26
## Min                                       2.75         3.25
## Max                                       4.25         4.25
## Range                                      1.5            1
## Q1                                        3.38         3.75
## Q3                                        3.88         3.88
## Iqr                                        0.5         0.12
## Normal                                   0.626         0.09
## IIC                                       3.63         3.78
## ICS                                       3.64         3.79
## Summary     Mean[ICI-ICS] 3.79 ( 3.78 - 3.79 )             
## Groups                           Homocedastics             
## Normality                                  Yes             
## Differences                                 No             
## p-value                                  0.153             
## Method                       t-Student(Pooled)

matched_means(intervencionc,intervencionc$entorno_pre,intervencionc$entorno_post)
## 
##                                  entorno_pre entorno_post
## n                                         14           14
## Mean                                     3.4          3.8
## Median                                  3.38         3.75
## Sd                                      0.38         0.27
## Min                                     2.62          3.5
## Max                                     4.12         4.38
## Range                                    1.5         0.88
## Q1                                      3.25         3.62
## Q3                                      3.59            4
## Iqr                                     0.34         0.38
## Normal                                 0.824         0.19
## IIC                                      3.4          3.8
## ICS                                     3.41         3.81
## Summary     Mean[ICI-ICS] 3.8 ( 3.8 - 3.81 )             
## Groups                         Homocedastics             
## Normality                                Yes             
## Differences                              Yes             
## p-value                                0.003             
## Method                     t-Student(Pooled)

means(datac,datac$total_pre,datac$G)
## 
##                         G = C            G = I
## n                          16               14
## Mean                     3.48             3.28
## Median                    3.5              3.3
## Sd                       0.31             0.23
## Min                      2.73             2.84
## Max                      3.93             3.54
## Range                     1.2             0.71
## Q1                       3.28             3.11
## Q3                       3.71             3.48
## Iqr                      0.44             0.37
## Normal                  0.511            0.229
## IIC                      3.47             3.28
## ICS                      3.48             3.28
## Summary2     3.48 (3.47-3.48) 3.28 (3.28-3.28)
## Summary         Mean[ICI-ICS]                 
## Groups          Homocedastics                 
## Normality                 Yes                 
## Differences                No                 
## p-value                 0.054                 
## Method      t-Student(Pooled)

matched_means(controlc,controlc$total_pre,controlc$total_post)
## 
##                                      total_pre total_post
## n                                           16         13
## Mean                                      3.48       3.57
## Median                                     3.5       3.61
## Sd                                        0.31       0.21
## Min                                       2.73       3.16
## Max                                       3.93       3.85
## Range                                      1.2       0.69
## Q1                                        3.28        3.5
## Q3                                        3.71       3.71
## Iqr                                       0.44       0.21
## Normal                                   0.511      0.412
## IIC                                       3.47       3.57
## ICS                                       3.48       3.57
## Summary     Mean[ICI-ICS] 3.57 ( 3.57 - 3.57 )           
## Groups                           Homocedastics           
## Normality                                  Yes           
## Differences                                 No           
## p-value                                  0.222           
## Method                       t-Student(Pooled)

matched_means(intervencionc,intervencionc$total_pre,intervencionc$total_post)
## 
##                                   total_pre total_post
## n                                        14         14
## Mean                                   3.28        3.7
## Median                                  3.3       3.71
## Sd                                     0.23       0.24
## Min                                    2.84       3.23
## Max                                    3.54       4.02
## Range                                  0.71       0.78
## Q1                                     3.11       3.52
## Q3                                     3.48       3.89
## Iqr                                    0.37       0.38
## Normal                                0.229      0.557
## IIC                                    3.28        3.7
## ICS                                    3.28        3.7
## Summary     Mean[ICI-ICS] 3.7 ( 3.7 - 3.7 )           
## Groups                        Homocedastics           
## Normality                               Yes           
## Differences                             Yes           
## p-value                              <0.001           
## Method                    t-Student(Pooled)

# means(datac,datac$A_pre,datac$G)
# matched_means(controlc,controlc$A_pre,controlc$A_post)
# matched_means(intervencionc,intervencionc$A_pre,intervencionc$A_post)
# 
# means(datac,datac$VLOM_pre,datac$G)
# matched_means(controlc,controlc$VLOM_pre,controlc$VLOM_post)
# matched_means(intervencionc,intervencionc$VLOM_pre,intervencionc$VLOM_post)
# 
# means(datac,datac$FRUTAS_pre,datac$G)
# means(datac,datac$FRUTAS_post,datac$G)
# 
# means(datac,datac$PRENDAS.DE.VESTIR_pre,datac$G)
# means(datac,datac$PRENDAS.DE.VESTIR_post,datac$G)
# 
# means(datac,datac$MMSE_pre,datac$G)
# matched_means(controlc,controlc$MMSE_pre,controlc$MMSE_post)
# matched_means(intervencionc,intervencionc$MMSE_pre,intervencionc$MMSE_post)

###########  ###########  Christopher
 lineal(intervencion$ferritina_pre,intervencion$IMC_pre,labely="ferritina",labelx="IMC",py=600,px=32)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     1790.87       -44.29  
## 
## [1] "r2=0.059"
## [1] "p=0.364"

 lineal(intervencion$ferritina_pre,intervencion$IL.6_pre,labely="ferritina",labelx="IL6",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      296.51         8.31  
## 
## [1] "r2=0.007"
## [1] "p=0.762"

 lineal(intervencion$ferritina_pre,intervencion$PCR_pre,labely="ferritina",labelx="PCR",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##       205.3         42.0  
## 
## [1] "r2=0.119"
## [1] "p=0.191"

 lineal(intervencion$ferritina_pre,intervencion$HbA1c_pre,labely="ferritina",labelx="HbA1c",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      -501.5        115.8  
## 
## [1] "r2=0.204"
## [1] "p=0.079"

 lineal(intervencion$ferritina_pre,intervencion$Glucemia,labely="ferritina",labelx="Glucemia",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##    255.9914       0.5754  
## 
## [1] "r2=0.004"
## [1] "p=0.814"

 lineal(intervencion$ferritina_pre,intervencion$TG_pre,labely="ferritina",labelx="TG",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##    248.6614       0.5229  
## 
## [1] "r2=0.007"
## [1] "p=0.767"

 lineal(intervencion$ferritina_pre,intervencion$HDL_pre,labely="ferritina",labelx="HDL",py=600,px=40)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     1267.52       -20.49  
## 
## [1] "r2=0.227"
## [1] "p=0.062"

 lineal(intervencion$ferritina_pre,intervencion$LDL_pre,labely="ferritina",labelx="LDL",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      561.65        -1.88  
## 
## [1] "r2=0.05"
## [1] "p=0.404"

  lineal(control$ferritina_pre,control$IMC_pre,labely="ferritina",labelx="IMC",py=600,px=32)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      -94.42        13.44  
## 
## [1] "r2=0.03"
## [1] "p=0.482"

 lineal(control$ferritina_pre,control$IL.6_pre,labely="ferritina",labelx="IL6",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     354.730       -3.497  
## 
## [1] "r2=0.001"
## [1] "p=0.924"

 lineal(control$ferritina_pre,control$PCR_pre,labely="ferritina",labelx="PCR",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     356.262       -3.623  
## 
## [1] "r2=0.002"
## [1] "p=0.841"

 lineal(control$ferritina_pre,control$HbA1c_pre,labely="ferritina",labelx="HbA1c",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      193.18        21.46  
## 
## [1] "r2=0.01"
## [1] "p=0.681"

 lineal(control$ferritina_pre,control$Glucemia,labely="ferritina",labelx="Glucemia",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##    261.0717       0.5523  
## 
## [1] "r2=0.005"
## [1] "p=0.764"

 lineal(control$ferritina_pre,control$TG_pre,labely="ferritina",labelx="TG",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     317.372        0.153  
## 
## [1] "r2=0.001"
## [1] "p=0.877"

 lineal(control$ferritina_pre,control$HDL_pre,labely="ferritina",labelx="HDL",py=600,px=40)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     438.589       -2.233  
## 
## [1] "r2=0.006"
## [1] "p=0.757"

 lineal(control$ferritina_pre,control$LDL_pre,labely="ferritina",labelx="LDL",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##    257.7474       0.7462  
## 
## [1] "r2=0.009"
## [1] "p=0.692"

 lineal(intervencion$ferritina_post,intervencion$IMC_post,labely="ferritina",labelx="IMC",py=600,px=32)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     -149.19        14.57  
## 
## [1] "r2=0.024"
## [1] "p=0.571"

 lineal(intervencion$ferritina_post,intervencion$IL.6_post,labely="ferritina",labelx="IL6",py=600,px=2)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      -183.7        166.1  
## 
## [1] "r2=0.265"
## [1] "p=0.041"

 lineal(intervencion$ferritina_post,intervencion$PCR_post,labely="ferritina",labelx="PCR",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      262.43        13.67  
## 
## [1] "r2=0.018"
## [1] "p=0.621"

 lineal(intervencion$ferritina_post,intervencion$HbA1c_post,labely="ferritina",labelx="HbA1c",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     -107.87        61.74  
## 
## [1] "r2=0.036"
## [1] "p=0.481"

 lineal(intervencion$ferritina_post,intervencion$TG_post,labely="ferritina",labelx="TG",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      32.593        2.057  
## 
## [1] "r2=0.046"
## [1] "p=0.424"

 lineal(intervencion$ferritina_post,intervencion$HDL_post,labely="ferritina",labelx="HDL",py=600,px=45)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     1027.62       -14.31  
## 
## [1] "r2=0.202"
## [1] "p=0.081"

 lineal(control$ferritina_post,control$IMC_post,labely="ferritina",labelx="IMC",py=600,px=32)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      -86.77        12.45  
## 
## [1] "r2=0.059"
## [1] "p=0.316"

 lineal(control$ferritina_post,control$IL.6_post,labely="ferritina",labelx="IL6",py=600,px=2)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     284.163        8.694  
## 
## [1] "r2=0.004"
## [1] "p=0.797"

 lineal(control$ferritina_post,control$PCR_post,labely="ferritina",labelx="PCR",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     303.219        3.246  
## 
## [1] "r2=0.004"
## [1] "p=0.792"

 lineal(control$ferritina_post,control$HbA1c_post,labely="ferritina",labelx="HbA1c",py=600,px=6)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      194.74        17.17  
## 
## [1] "r2=0.009"
## [1] "p=0.706"

 lineal(control$ferritina_post,control$TG_post,labely="ferritina",labelx="TG",py=600,px=130)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##    208.0324       0.6446  
## 
## [1] "r2=0.04"
## [1] "p=0.412"

 lineal(control$ferritina_post,control$HDL_post,labely="ferritina",labelx="HDL",py=600,px=45)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     442.817       -3.128  
## 
## [1] "r2=0.02"
## [1] "p=0.564"

 ###########  Regresion logistica
 
 modelo <- glm(ferritina_pre ~ edad + IMC_pre + IL.6_pre + HbA1c_pre , data = intervencion)
 summary(modelo)
## 
## Call:
## glm(formula = ferritina_pre ~ edad + IMC_pre + IL.6_pre + HbA1c_pre, 
##     data = intervencion)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -512.64  -162.13    48.18   178.50   400.50  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  -591.97    1711.37  -0.346    0.736  
## edad           25.72      17.15   1.499    0.162  
## IMC_pre       -46.99      43.26  -1.086    0.301  
## IL.6_pre      -43.31      32.05  -1.352    0.204  
## HbA1c_pre     141.30      72.42   1.951    0.077 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 90235.04)
## 
##     Null deviance: 1677191  on 15  degrees of freedom
## Residual deviance:  992585  on 11  degrees of freedom
## AIC: 233.97
## 
## Number of Fisher Scoring iterations: 2
 confint(modelo)
## Waiting for profiling to be done...
##                     2.5 %     97.5 %
## (Intercept) -3946.2050109 2762.25810
## edad           -7.9002896   59.33436
## IMC_pre      -131.7746346   37.78615
## IL.6_pre     -106.1274907   19.49813
## HbA1c_pre      -0.6471779  283.24027
 modelo <- glm(ferritina_post ~ edad + IMC_post + IL.6_post + HbA1c_post , data = intervencion)
 summary(modelo)
## 
## Call:
## glm(formula = ferritina_post ~ edad + IMC_post + IL.6_post + 
##     HbA1c_post, data = intervencion)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -299.48  -165.68   -55.75    74.31   649.99  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -156.497   1574.353  -0.099    0.923
## edad          -1.287     18.929  -0.068    0.947
## IMC_post       3.240     27.070   0.120    0.907
## IL.6_post    171.353    116.741   1.468    0.170
## HbA1c_post    -9.136     93.531  -0.098    0.924
## 
## (Dispersion parameter for gaussian family taken to be 94488.36)
## 
##     Null deviance: 1417498  on 15  degrees of freedom
## Residual deviance: 1039372  on 11  degrees of freedom
## AIC: 234.71
## 
## Number of Fisher Scoring iterations: 2
 confint(modelo)
## Waiting for profiling to be done...
##                   2.5 %     97.5 %
## (Intercept) -3242.17248 2929.17810
## edad          -38.38840   35.81346
## IMC_post      -49.81588   56.29550
## IL.6_post     -57.45431  400.16014
## HbA1c_post   -192.45395  174.18252
 modelo <- glm(ferritina_pre ~ edad + IMC_pre + IL.6_pre + HbA1c_pre , data = control)
 summary(modelo)
## 
## Call:
## glm(formula = ferritina_pre ~ edad + IMC_pre + IL.6_pre + HbA1c_pre, 
##     data = control)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -324.47   -90.35   -31.62    69.71   588.69  
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)  
## (Intercept) -2362.901   1081.377  -2.185   0.0464 *
## edad           22.747      9.427   2.413   0.0301 *
## IMC_pre        48.576     23.067   2.106   0.0537 .
## IL.6_pre      -53.661     38.925  -1.379   0.1897  
## HbA1c_pre     -17.181     49.000  -0.351   0.7311  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 50133.07)
## 
##     Null deviance: 1042154  on 18  degrees of freedom
## Residual deviance:  701863  on 14  degrees of freedom
## AIC: 265.74
## 
## Number of Fisher Scoring iterations: 2
 confint(modelo)
## Waiting for profiling to be done...
##                    2.5 %     97.5 %
## (Intercept) -4482.361446 -243.44016
## edad            4.270462   41.22358
## IMC_pre         3.365015   93.78775
## IL.6_pre     -129.951940   22.62972
## HbA1c_pre    -113.219094   78.85620
 modelo <- glm(ferritina_post ~ edad + IMC_post + IL.6_post + HbA1c_post , data = control)
 summary(modelo)
## 
## Call:
## glm(formula = ferritina_post ~ edad + IMC_post + IL.6_post + 
##     HbA1c_post, data = control)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -272.93   -88.39   -13.77    96.24   317.04  
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)  
## (Intercept) -2379.352    926.192  -2.569   0.0223 *
## edad           24.655      9.069   2.719   0.0166 *
## IMC_post       44.598     16.674   2.675   0.0181 *
## IL.6_post     -82.991     43.386  -1.913   0.0764 .
## HbA1c_post      2.854     43.418   0.066   0.9485  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 29642.85)
## 
##     Null deviance: 674149  on 18  degrees of freedom
## Residual deviance: 415000  on 14  degrees of freedom
## AIC: 255.76
## 
## Number of Fisher Scoring iterations: 2
 confint(modelo)
## Waiting for profiling to be done...
##                   2.5 %      97.5 %
## (Intercept) -4194.65575 -564.048714
## edad            6.87966   42.430931
## IMC_post       11.91656   77.278454
## IL.6_post    -168.02552    2.044087
## HbA1c_post    -82.24251   87.951092
###########  
 
 lineal(control$ferritina_pre,control$PCR_pre,labely="ferritina",labelx="PCR",py=600,px=45)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     356.262       -3.623  
## 
## [1] "r2=0.002"
## [1] "p=0.841"

 lineal(intervencion$ferritina_pre,intervencion$PCR_pre,labely="ferritina",labelx="PCR",py=600,px=45)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##       205.3         42.0  
## 
## [1] "r2=0.119"
## [1] "p=0.191"

 lineal(control$ferritina_post,control$PCR_post,labely="ferritina",labelx="PCR",py=600,px=45)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     303.219        3.246  
## 
## [1] "r2=0.004"
## [1] "p=0.792"

 lineal(intervencion$ferritina_post,intervencion$PCR_post,labely="ferritina",labelx="PCR",py=600,px=45)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      262.43        13.67  
## 
## [1] "r2=0.018"
## [1] "p=0.621"

 lineal(control$HbA1c_pre,control$IMC_pre,labely="HbA1c",labelx="IMC")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     6.08625      0.02743  
## 
## [1] "r2=0.006"
## [1] "p=0.762"

 lineal(control$HbA1c_post,control$IMC_post,labely="HbA1c",labelx="IMC")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     3.94844      0.09837  
## 
## [1] "r2=0.126"
## [1] "p=0.135"

 lineal(intervencion$HbA1c_pre,intervencion$IMC_pre,labely="HbA1c",labelx="IMC")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     8.01455     -0.02438  
## 
## [1] "r2=0.001"
## [1] "p=0.9"

 lineal(intervencion$HbA1c_post,intervencion$IMC_post,labely="HbA1c",labelx="IMC")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      4.2872       0.0766  
## 
## [1] "r2=0.069"
## [1] "p=0.327"

 lineal(control$IL.6_pre,control$PCR_pre,labely="IL-6",labelx="PCR")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      2.5321       0.2289  
## 
## [1] "r2=0.214"
## [1] "p=0.046"

 lineal(control$IL.6_post,control$PCR_post,labely="IL-6",labelx="PCR")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      2.7964       0.2348  
## 
## [1] "r2=0.417"
## [1] "p=0.003"

 lineal(intervencion$IL.6_pre,intervencion$PCR_pre,labely="IL-6",labelx="PCR")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      2.9011       0.5213  
## 
## [1] "r2=0.187"
## [1] "p=0.095"

 lineal(intervencion$IL.6_post,intervencion$PCR_post,labely="IL-6",labelx="PCR")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     2.63324      0.09976  
## 
## [1] "r2=0.1"
## [1] "p=0.233"

 control$relaciontghdl_pre=control$TG_pre/control$HDL_pre
 control$relaciontghdl_post=control$TG_post/control$HDL_post
 intervencion$relaciontghdl_pre=intervencion$TG_pre/intervencion$HDL_pre
 intervencion$relaciontghdl_post=intervencion$TG_post/intervencion$HDL_post
 
 lineal(control$ferritina_pre,control$relaciontghdl_pre,labely="ferritina",labelx="tg/hdl")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     353.245       -2.489  
## 
## [1] "r2=0"
## [1] "p=0.933"

 lineal(intervencion$ferritina_pre,intervencion$relaciontghdl_pre,labely="ferritina",labelx="tg/hdl")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      -31.53        99.22  
## 
## [1] "r2=0.153"
## [1] "p=0.135"

 lineal(control$ferritina_post,control$relaciontghdl_post,labely="ferritina",labelx="tg/hdl")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     291.008        5.632  
## 
## [1] "r2=0.006"
## [1] "p=0.759"

 lineal(intervencion$ferritina_post,intervencion$relaciontghdl_post,labely="ferritina",labelx="tg/hdl")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      -276.1        215.1  
## 
## [1] "r2=0.341"
## [1] "p=0.017"

 means(control,control$blancos_post)
## 
##                                blancos_post
## n                                        19
## Mean                                   7.43
## Median                                  7.1
## Sd                                      1.6
## Min                                       5
## Max                                    10.6
## Range                                   5.6
## Q1                                      6.5
## Q3                                      8.4
## Iqr                                     1.9
## Normality                             0.257
## ICI                                    7.41
## SCI                                    7.45
## Summary   Mean[ICI-ICS] --> 7.43(7.41-7.45)

 lineal(control$blancos_post,control$PCR_post,labely="g.blancos",labelx="PCR")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     7.18104      0.05742  
## 
## [1] "r2=0.019"
## [1] "p=0.571"

 lineal(control$blancos_post,control$IL.6_post,labely="g.blancos",labelx="IL.6")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      7.0392       0.1027  
## 
## [1] "r2=0.008"
## [1] "p=0.713"

 means(intervencion,intervencion$blancos_post)
## 
##                                blancos_post
## n                                        16
## Mean                                   7.12
## Median                                    7
## Sd                                     1.23
## Min                                     5.4
## Max                                     9.6
## Range                                   4.2
## Q1                                     6.55
## Q3                                      7.6
## Iqr                                    1.05
## Normality                             0.221
## ICI                                    7.11
## SCI                                    7.14
## Summary   Mean[ICI-ICS] --> 7.12(7.11-7.14)

 lineal(intervencion$blancos_post,intervencion$PCR_post,labely="g.blancos",labelx="PCR")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      6.5240       0.1983  
## 
## [1] "r2=0.235"
## [1] "p=0.057"

 lineal(intervencion$blancos_post,intervencion$IL.6_post,labely="g.blancos",labelx="IL.6")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##      6.4900       0.2163  
## 
## [1] "r2=0.028"
## [1] "p=0.537"

 means(control,control$hb_post)
## 
##                                      hb_post
## n                                         19
## Mean                                   13.89
## Median                                  13.4
## Sd                                      1.33
## Min                                     12.4
## Max                                     17.2
## Range                                    4.8
## Q1                                      13.1
## Q3                                     14.25
## Iqr                                     1.15
## Normality                              0.001
## ICI                                    13.88
## SCI                                    13.91
## Summary   Median[Q1-Q3]  -->13.4(13.1-14.25)

 lineal(control$hb_post,control$HbA1c_post,labely="Hb",labelx="Hba1c")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##   13.940466    -0.006403  
## 
## [1] "r2=0"
## [1] "p=0.984"

 lineal(control$hb_post,control$ferritina_post,labely="Hb",labelx="ferritina")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##   12.609677     0.004049  
## 
## [1] "r2=0.346"
## [1] "p=0.008"

 means(intervencion,intervencion$hb_post)
## 
##                                        hb_post
## n                                           16
## Mean                                     13.61
## Median                                   13.75
## Sd                                        1.39
## Min                                       11.3
## Max                                         16
## Range                                      4.7
## Q1                                       12.57
## Q3                                        14.3
## Iqr                                       1.73
## Normality                                0.801
## ICI                                      13.59
## SCI                                      13.63
## Summary   Mean[ICI-ICS] --> 13.61(13.59-13.63)

 lineal(intervencion$hb_post,intervencion$HbA1c_post,labely="Hb",labelx="Hba1c")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     10.8147       0.4195  
## 
## [1] "r2=0.081"
## [1] "p=0.284"

 lineal(intervencion$hb_post,intervencion$ferritina_post,labely="Hb",labelx="ferritina")
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##   12.782152     0.002733  
## 
## [1] "r2=0.364"
## [1] "p=0.013"