1 Pre-CA analyses

1.1 Summary statistics

In this section, we look at some of the summary statistics for our NDNS RP (9 year) dataset in adults (age >= 19 y.o.). After excluding food recordings from young participants, there were 749,026 recordings of food entry written by the 6802 pariticipants.

1.1.1 numbers of food entries by time slots (7 or 3 groups)

load("../Food1_9_adlt_labl.Rdata")

Food1_9_adlt %>% 
  ungroup() %>% 
  group_by(MealTimeSlot) %>% 
  summarise(n = n()) %>% 
  mutate(relfreq = n/sum(n)) %>% 
  mutate(rel.freq = paste0(round(100 * n/sum(n), 3), "%"))  %>% 
  mutate(cum.freq = paste0(round(100 * cumsum(relfreq), 3), "%")) %>% 
  print(n=Inf)
## # A tibble: 7 x 5
##   MealTimeSlot           n relfreq rel.freq cum.freq
##   <fct>              <int>   <dbl> <chr>    <chr>   
## 1 6am to 8:59am     107144  0.143  14.304%  14.304% 
## 2 9am to 11:59am    110614  0.148  14.768%  29.072% 
## 3 12 noon to 1:59pm 138183  0.184  18.448%  47.521% 
## 4 2pm to 4:59pm      94606  0.126  12.631%  60.151% 
## 5 5pm to 7:59pm     180498  0.241  24.098%  84.249% 
## 6 8pm to 9:59pm      81716  0.109  10.91%   95.158% 
## 7 10pm to 5:59am     36265  0.0484 4.842%   100%
Food1_9_adlt %>% 
  ungroup() %>% 
  group_by(Time3g) %>% 
  summarise(n = n()) %>% 
  mutate(relfreq = n/sum(n)) %>% 
  mutate(rel.freq = paste0(round(100 * n/sum(n), 3), "%"))  %>% 
  mutate(cum.freq = paste0(round(100 * cumsum(relfreq), 3), "%")) %>% 
  print(n=Inf)
## # A tibble: 3 x 5
##   Time3g         n relfreq rel.freq cum.freq
##   <fct>      <int>   <dbl> <chr>    <chr>   
## 1 Morning   217758   0.291 29.072%  29.072% 
## 2 Afternoon 413287   0.552 55.177%  84.249% 
## 3 Evening   117981   0.158 15.751%  100%

1.1.2 Days of week collected in the dataset

Food1_9_adlt %>% 
  mutate(DayofWeek = factor(DayofWeek, levels = c("Monday",
                                                  "Tuesday",
                                                  "Wednesday",
                                                  "Thursday",
                                                  "Friday", 
                                                  "Saturday",
                                                  "Sunday"))) %>% 
  ungroup() %>% 
  group_by(DayofWeek) %>% 
  summarise(n = n()) %>% 
  mutate(relfreq = n/sum(n)) %>% 
  mutate(rel.freq = paste0(round(100 * n/sum(n), 3), "%"))  %>% 
  mutate(cum.freq = paste0(round(100 * cumsum(relfreq), 3), "%")) %>% 
  print(n=Inf)
## # A tibble: 7 x 5
##   DayofWeek      n relfreq rel.freq cum.freq
##   <fct>      <int>   <dbl> <chr>    <chr>   
## 1 Monday    104922   0.140 14.008%  14.008% 
## 2 Tuesday   102039   0.136 13.623%  27.631% 
## 3 Wednesday 100621   0.134 13.434%  41.064% 
## 4 Thursday  104898   0.140 14.005%  55.069% 
## 5 Friday    112669   0.150 15.042%  70.111% 
## 6 Saturday  111405   0.149 14.873%  84.984% 
## 7 Sunday    112472   0.150 15.016%  100%

1.1.3 Sex and age

The participants were:

  • 2810 men (sex = 1) and
  • 3992 women (sex = 2) aged 19 or above.
load("../Indiv1_9_adlt.Rdata")
Indiv1_9_adlt$Sex <- factor(Indiv1_9_adlt$Sex)
Indiv1_9_adlt %>% 
  group_by(Sex) %>% 
  summarise(Meanage = mean(age), 
            SDage = sd(age))
## # A tibble: 2 x 3
##   Sex   Meanage SDage
##   <fct>   <dbl> <dbl>
## 1 1        50.4  17.2
## 2 2        49.6  17.8
ggplot(Indiv1_9_adlt, aes(x=age, fill = Sex, color = Sex)) + 
 geom_histogram(aes(y=..density..), colour="black", fill="white", binwidth = 2)+
 geom_density(alpha=.2) 

1.1.4 Diabetes status

In all 9 years data combined, there were:

  • 227 diabetes patients (DM4cat = 3);
  • 99 undiagnosed diabetes (DM4cat = 2);
  • 133 prediabetes (DM4cat = 1);
  • 2626 non-diabetes participants (DM4cat = 0);
  • 3717 missing values.
load("../Indiv1_9_adlt.Rdata")

Indiv1_9_adlt %>% 
  group_by(DM4cat) %>% 
  summarise(n = n()) %>% 
  mutate(rel.freq = paste0(round(100 * n/sum(n), 2), "%"))  %>% 
  print(n=Inf)
## # A tibble: 5 x 3
##   DM4cat     n rel.freq
##    <dbl> <int> <chr>   
## 1      0  2626 38.61%  
## 2      1   133 1.96%   
## 3      2    99 1.46%   
## 4      3   227 3.34%   
## 5     NA  3717 54.65%

1.1.5 Social economic status

121 pariticipants’ socio-economic classification were missing.

library(naniar)

Indiv1_9_adlt %>% 
  replace_with_na(replace = list(nssec8 = -9)) %>% 
  group_by(nssec8) %>% 
  summarise(n = n()) %>% 
  mutate(relfreq = n/sum(n)) %>% 
  mutate(rel.freq = paste0(round(100 * n/sum(n), 3), "%"))  %>% 
  mutate(cum.freq = paste0(round(100 * cumsum(relfreq), 3), "%")) %>% 
  print(n=Inf)
## # A tibble: 9 x 5
##   nssec8     n relfreq rel.freq cum.freq
##    <dbl> <int>   <dbl> <chr>    <chr>   
## 1      1  1032  0.152  15.172%  15.172% 
## 2      2  1632  0.240  23.993%  39.165% 
## 3      3   672  0.0988 9.879%   49.044% 
## 4      4   727  0.107  10.688%  59.732% 
## 5      5   630  0.0926 9.262%   68.994% 
## 6      6   972  0.143  14.29%   83.284% 
## 7      7   819  0.120  12.041%  95.325% 
## 8      8   197  0.0290 2.896%   98.221% 
## 9     NA   121  0.0178 1.779%   100%

1.2 Food groups

All 60 food groups sorted by the percentage contributed to the total calories consumed by participants. We can see 13 food groups contributed 50% of total energy that these pariticipants consumed, 28 food groups contributed 80% of total energy that these people consumed.

TableFoogGroup <- Food1_9_adlt %>% 
  ungroup() %>% 
  group_by(mfgLab) %>% 
  summarise(n = n(), meanHpoint = mean(H_points, na.rm = T), mfgCalories = sum(Energykcal)) %>% 
  arrange(-mfgCalories) %>% 
  mutate(n.freq = paste0(round(100 * n/sum(n), 2), "%"))  %>% 
  mutate(cal.Prop = paste0(round(100 * mfgCalories/sum(mfgCalories), 2), "%"))  %>% 
  mutate(calprop = mfgCalories/sum(mfgCalories)) %>% 
  mutate(calcumprop = paste0(round(100 * cumsum(calprop), 3), "%")) %>% 
  select(-calprop) %>% 
  print(n=Inf)
## # A tibble: 60 x 7
##    mfgLab               n meanHpoint mfgCalories n.freq cal.Prop calcumprop
##    <chr>            <int>      <dbl>       <dbl> <chr>  <chr>    <chr>     
##  1 Pasta & Rice     18353    -0.301     3512070. 2.45%  7.36%    7.362%    
##  2 White Bread      18434     3.61      3245641. 2.46%  6.8%     14.166%   
##  3 Chips             6749     0.0935    1884059. 0.9%   3.95%    18.116%   
##  4 Cakes & Pastri…   7806    17.3       1710594. 1.04%  3.59%    21.701%   
##  5 Veg not raw      51317    -7.03      1665474. 6.85%  3.49%    25.193%   
##  6 Biscuits         13200    18.3       1662598. 1.76%  3.49%    28.678%   
##  7 Fruit            33903    -2.81      1641675. 4.53%  3.44%    32.12%    
##  8 Misc./Vending    48597     9.49      1639025. 6.49%  3.44%    35.555%   
##  9 Chicken/turkey    8863     0.534     1617820. 1.18%  3.39%    38.947%   
## 10 Cheese           10983    21.5       1492015. 1.47%  3.13%    42.074%   
## 11 Beer lager        8199     0.990     1484001. 1.09%  3.11%    45.185%   
## 12 2% milk          57611     1.02      1302650. 7.69%  2.73%    47.916%   
## 13 Potatos other    10113    -1.49      1291448. 1.35%  2.71%    50.623%   
## 14 JamsSpreads      37960    14.7       1215279. 5.07%  2.55%    53.171%   
## 15 Beef              4987     2.34      1124560. 0.67%  2.36%    55.528%   
## 16 HiFi cereals      8215     2.78      1072814. 1.1%   2.25%    57.777%   
## 17 WMeal Bread       7193     2.08      1070696. 0.96%  2.24%    60.022%   
## 18 Chocolate         6495    24.9       1046113. 0.87%  2.19%    62.215%   
## 19 Wine              6967     1.33      1027793. 0.93%  2.15%    64.369%   
## 20 Brown Bread       6183     1.11      1009075. 0.83%  2.12%    66.484%   
## 21 Butter           10203    24.3        965901. 1.36%  2.02%    68.509%   
## 22 Eggs              7554     3.70       964769. 1.01%  2.02%    70.532%   
## 23 Reg soft drinks  11387     3.31       940517. 1.52%  1.97%    72.503%   
## 24 Spreads less-f…  12620    23.4        848835. 1.68%  1.78%    74.283%   
## 25 Crisps            5664    13.0        835672. 0.76%  1.75%    76.035%   
## 26 Sausages          3025    15.3        775004. 0.4%   1.62%    77.659%   
## 27 Meat pastries     1979    14.8        744640. 0.26%  1.56%    79.22%    
## 28 Bacon and ham     8467    15.5        738727. 1.13%  1.55%    80.769%   
## 29 Yogurt            6776     3.22       665485. 0.9%   1.4%     82.164%   
## 30 LoFi cereals      4303    11.6        560296. 0.57%  1.17%    83.338%   
## 31 Nuts and seeds    6259     4.37       559874. 0.84%  1.17%    84.512%   
## 32 Oily fish         2610     6.21       550425. 0.35%  1.15%    85.666%   
## 33 Whole Milk       13628     2.24       530449. 1.82%  1.11%    86.778%   
## 34 White fish, sh…   1597     3.99       498929. 0.21%  1.05%    87.824%   
## 35 Puddings          2291     8.40       459785. 0.31%  0.96%    88.788%   
## 36 Other Milk Cre…   6605    11.6        434239. 0.88%  0.91%    89.698%   
## 37 Pork              1832     3.88       420504. 0.24%  0.88%    90.579%   
## 38 Fruit juice       6960     1.79       419867. 0.93%  0.88%    91.459%   
## 39 Margarine         8742    19.6        410108. 1.17%  0.86%    92.319%   
## 40 Coated Chicken    1170     6.43       359773. 0.16%  0.75%    93.073%   
## 41 Other white fi…   3703     1.28       355118. 0.49%  0.74%    93.818%   
## 42 Lamb              1251     6.42       342289. 0.17%  0.72%    94.535%   
## 43 Burgers/kebabs     939    14.6        328396. 0.13%  0.69%    95.224%   
## 44 Ice cream         1816    15.4        309564. 0.24%  0.65%    95.873%   
## 45 Salad and raw …  33263    -7.03       297085. 4.44%  0.62%    96.495%   
## 46 Spirits and li…   2698     4.03       286589. 0.36%  0.6%     97.096%   
## 47 Other meat        1571    17.0        271445. 0.21%  0.57%    97.665%   
## 48 Tea/Coffee/Wat… 152108    -0.245      175659. 20.31% 0.37%    98.033%   
## 49 Skimmed Milk      9683    -0.545      168679. 1.29%  0.35%    98.387%   
## 50 Sugar confecti…   1820    14.5        164392. 0.24%  0.34%    98.732%   
## 51 Oth Bread          932     4.96       149552. 0.12%  0.31%    99.045%   
## 52 LowFat Spreads    3654    18.1        134527. 0.49%  0.28%    99.327%   
## 53 Polyunsatu mar…   3179    20.0        126714. 0.42%  0.27%    99.593%   
## 54 Liver              454    13.6         67330. 0.06%  0.14%    99.734%   
## 55 Dietary supple…  13016     5.16        44916. 1.74%  0.09%    99.828%   
## 56 Diet soft drin…  14155     0.321       32855. 1.89%  0.07%    99.897%   
## 57 1% milk           1263     0.973       27534. 0.17%  0.06%    99.955%   
## 58 Smoothies          137     2.93        17061. 0.02%  0.04%    99.99%    
## 59 Artificial Swe…   7518     1.60         2689. 1%     0.01%    99.996%   
## 60 Commercial tod…     66    18.5          1862. 0.01%  0%       100%

1.2.1 Healthy point definition by (Pechey et al, 2013)

1.2.1.1 Healthy foods (n = 3) meanHpoint < -2

TableFoogGroup <- TableFoogGroup %>% 
  mutate(healthy     = meanHpoint < -2, 
         lesshealthy = meanHpoint > 4, 
         neutral     = (meanHpoint <= 4) & (meanHpoint >= -2))

TableFoogGroup %>% 
  filter(healthy) %>% 
  select(-lesshealthy, -neutral,-calcumprop)
## # A tibble: 3 x 7
##   mfgLab                n meanHpoint mfgCalories n.freq cal.Prop healthy
##   <chr>             <int>      <dbl>       <dbl> <chr>  <chr>    <lgl>  
## 1 Veg not raw       51317      -7.03    1665474. 6.85%  3.49%    TRUE   
## 2 Fruit             33903      -2.81    1641675. 4.53%  3.44%    TRUE   
## 3 Salad and raw veg 33263      -7.03     297085. 4.44%  0.62%    TRUE

1.2.1.2 Neutral foods (n = 26); meanHpoint between (-2, 4)

TableFoogGroup %>% 
  filter(neutral) %>% 
  select(-lesshealthy, -healthy, -calcumprop) %>% 
  print(n=Inf)
## # A tibble: 26 x 7
##    mfgLab                  n meanHpoint mfgCalories n.freq cal.Prop neutral
##    <chr>               <int>      <dbl>       <dbl> <chr>  <chr>    <lgl>  
##  1 Pasta & Rice        18353    -0.301     3512070. 2.45%  7.36%    TRUE   
##  2 White Bread         18434     3.61      3245641. 2.46%  6.8%     TRUE   
##  3 Chips                6749     0.0935    1884059. 0.9%   3.95%    TRUE   
##  4 Chicken/turkey       8863     0.534     1617820. 1.18%  3.39%    TRUE   
##  5 Beer lager           8199     0.990     1484001. 1.09%  3.11%    TRUE   
##  6 2% milk             57611     1.02      1302650. 7.69%  2.73%    TRUE   
##  7 Potatos other       10113    -1.49      1291448. 1.35%  2.71%    TRUE   
##  8 Beef                 4987     2.34      1124560. 0.67%  2.36%    TRUE   
##  9 HiFi cereals         8215     2.78      1072814. 1.1%   2.25%    TRUE   
## 10 WMeal Bread          7193     2.08      1070696. 0.96%  2.24%    TRUE   
## 11 Wine                 6967     1.33      1027793. 0.93%  2.15%    TRUE   
## 12 Brown Bread          6183     1.11      1009075. 0.83%  2.12%    TRUE   
## 13 Eggs                 7554     3.70       964769. 1.01%  2.02%    TRUE   
## 14 Reg soft drinks     11387     3.31       940517. 1.52%  1.97%    TRUE   
## 15 Yogurt               6776     3.22       665485. 0.9%   1.4%     TRUE   
## 16 Whole Milk          13628     2.24       530449. 1.82%  1.11%    TRUE   
## 17 White fish, shell…   1597     3.99       498929. 0.21%  1.05%    TRUE   
## 18 Pork                 1832     3.88       420504. 0.24%  0.88%    TRUE   
## 19 Fruit juice          6960     1.79       419867. 0.93%  0.88%    TRUE   
## 20 Other white fish     3703     1.28       355118. 0.49%  0.74%    TRUE   
## 21 Tea/Coffee/Water   152108    -0.245      175659. 20.31% 0.37%    TRUE   
## 22 Skimmed Milk         9683    -0.545      168679. 1.29%  0.35%    TRUE   
## 23 Diet soft drinks    14155     0.321       32855. 1.89%  0.07%    TRUE   
## 24 1% milk              1263     0.973       27534. 0.17%  0.06%    TRUE   
## 25 Smoothies             137     2.93        17061. 0.02%  0.04%    TRUE   
## 26 Artificial Sweete…   7518     1.60         2689. 1%     0.01%    TRUE

1.2.1.3 Less Healthy foods (n = 31); meanHpoint > 4

TableFoogGroup %>% 
  filter(lesshealthy) %>% 
  select(-neutral, -healthy, -calcumprop) %>% 
  print(n=Inf)
## # A tibble: 31 x 7
##    mfgLab              n meanHpoint mfgCalories n.freq cal.Prop lesshealthy
##    <chr>           <int>      <dbl>       <dbl> <chr>  <chr>    <lgl>      
##  1 Cakes & Pastri…  7806      17.3     1710594. 1.04%  3.59%    TRUE       
##  2 Biscuits        13200      18.3     1662598. 1.76%  3.49%    TRUE       
##  3 Misc./Vending   48597       9.49    1639025. 6.49%  3.44%    TRUE       
##  4 Cheese          10983      21.5     1492015. 1.47%  3.13%    TRUE       
##  5 JamsSpreads     37960      14.7     1215279. 5.07%  2.55%    TRUE       
##  6 Chocolate        6495      24.9     1046113. 0.87%  2.19%    TRUE       
##  7 Butter          10203      24.3      965901. 1.36%  2.02%    TRUE       
##  8 Spreads less-f… 12620      23.4      848835. 1.68%  1.78%    TRUE       
##  9 Crisps           5664      13.0      835672. 0.76%  1.75%    TRUE       
## 10 Sausages         3025      15.3      775004. 0.4%   1.62%    TRUE       
## 11 Meat pastries    1979      14.8      744640. 0.26%  1.56%    TRUE       
## 12 Bacon and ham    8467      15.5      738727. 1.13%  1.55%    TRUE       
## 13 LoFi cereals     4303      11.6      560296. 0.57%  1.17%    TRUE       
## 14 Nuts and seeds   6259       4.37     559874. 0.84%  1.17%    TRUE       
## 15 Oily fish        2610       6.21     550425. 0.35%  1.15%    TRUE       
## 16 Puddings         2291       8.40     459785. 0.31%  0.96%    TRUE       
## 17 Other Milk Cre…  6605      11.6      434239. 0.88%  0.91%    TRUE       
## 18 Margarine        8742      19.6      410108. 1.17%  0.86%    TRUE       
## 19 Coated Chicken   1170       6.43     359773. 0.16%  0.75%    TRUE       
## 20 Lamb             1251       6.42     342289. 0.17%  0.72%    TRUE       
## 21 Burgers/kebabs    939      14.6      328396. 0.13%  0.69%    TRUE       
## 22 Ice cream        1816      15.4      309564. 0.24%  0.65%    TRUE       
## 23 Spirits and li…  2698       4.03     286589. 0.36%  0.6%     TRUE       
## 24 Other meat       1571      17.0      271445. 0.21%  0.57%    TRUE       
## 25 Sugar confecti…  1820      14.5      164392. 0.24%  0.34%    TRUE       
## 26 Oth Bread         932       4.96     149552. 0.12%  0.31%    TRUE       
## 27 LowFat Spreads   3654      18.1      134527. 0.49%  0.28%    TRUE       
## 28 Polyunsatu mar…  3179      20.0      126714. 0.42%  0.27%    TRUE       
## 29 Liver             454      13.6       67330. 0.06%  0.14%    TRUE       
## 30 Dietary supple… 13016       5.16      44916. 1.74%  0.09%    TRUE       
## 31 Commercial tod…    66      18.5        1862. 0.01%  0%       TRUE

1.2.2 Healthy point definition by tertiles of meanHpoint

TableFoogGroup <- TableFoogGroup %>% 
  mutate(HealthPoints3g = ntile(meanHpoint, 3))

1.2.2.1 Healthy foods Group 1 (n = 20)

TableFoogGroup %>% 
  filter(HealthPoints3g == 1) %>% 
  select(-lesshealthy, -neutral,-calcumprop, -healthy, -HealthPoints3g) %>% 
  print(n=Inf)
## # A tibble: 20 x 6
##    mfgLab                     n meanHpoint mfgCalories n.freq cal.Prop
##    <chr>                  <int>      <dbl>       <dbl> <chr>  <chr>   
##  1 Pasta & Rice           18353    -0.301     3512070. 2.45%  7.36%   
##  2 Chips                   6749     0.0935    1884059. 0.9%   3.95%   
##  3 Veg not raw            51317    -7.03      1665474. 6.85%  3.49%   
##  4 Fruit                  33903    -2.81      1641675. 4.53%  3.44%   
##  5 Chicken/turkey          8863     0.534     1617820. 1.18%  3.39%   
##  6 Beer lager              8199     0.990     1484001. 1.09%  3.11%   
##  7 2% milk                57611     1.02      1302650. 7.69%  2.73%   
##  8 Potatos other          10113    -1.49      1291448. 1.35%  2.71%   
##  9 WMeal Bread             7193     2.08      1070696. 0.96%  2.24%   
## 10 Wine                    6967     1.33      1027793. 0.93%  2.15%   
## 11 Brown Bread             6183     1.11      1009075. 0.83%  2.12%   
## 12 Whole Milk             13628     2.24       530449. 1.82%  1.11%   
## 13 Fruit juice             6960     1.79       419867. 0.93%  0.88%   
## 14 Other white fish        3703     1.28       355118. 0.49%  0.74%   
## 15 Salad and raw veg      33263    -7.03       297085. 4.44%  0.62%   
## 16 Tea/Coffee/Water      152108    -0.245      175659. 20.31% 0.37%   
## 17 Skimmed Milk            9683    -0.545      168679. 1.29%  0.35%   
## 18 Diet soft drinks       14155     0.321       32855. 1.89%  0.07%   
## 19 1% milk                 1263     0.973       27534. 0.17%  0.06%   
## 20 Artificial Sweeteners   7518     1.60         2689. 1%     0.01%

1.2.2.2 Healthy foods Group 2 (n = 20)

TableFoogGroup %>% 
  filter(HealthPoints3g == 2) %>% 
  select(-lesshealthy, -neutral,-calcumprop, -healthy, -HealthPoints3g)
## # A tibble: 20 x 6
##    mfgLab                    n meanHpoint mfgCalories n.freq cal.Prop
##    <chr>                 <int>      <dbl>       <dbl> <chr>  <chr>   
##  1 White Bread           18434       3.61    3245641. 2.46%  6.8%    
##  2 Misc./Vending         48597       9.49    1639025. 6.49%  3.44%   
##  3 Beef                   4987       2.34    1124560. 0.67%  2.36%   
##  4 HiFi cereals           8215       2.78    1072814. 1.1%   2.25%   
##  5 Eggs                   7554       3.70     964769. 1.01%  2.02%   
##  6 Reg soft drinks       11387       3.31     940517. 1.52%  1.97%   
##  7 Yogurt                 6776       3.22     665485. 0.9%   1.4%    
##  8 LoFi cereals           4303      11.6      560296. 0.57%  1.17%   
##  9 Nuts and seeds         6259       4.37     559874. 0.84%  1.17%   
## 10 Oily fish              2610       6.21     550425. 0.35%  1.15%   
## 11 White fish, shellfish  1597       3.99     498929. 0.21%  1.05%   
## 12 Puddings               2291       8.40     459785. 0.31%  0.96%   
## 13 Other Milk Cream       6605      11.6      434239. 0.88%  0.91%   
## 14 Pork                   1832       3.88     420504. 0.24%  0.88%   
## 15 Coated Chicken         1170       6.43     359773. 0.16%  0.75%   
## 16 Lamb                   1251       6.42     342289. 0.17%  0.72%   
## 17 Spirits and liqueurs   2698       4.03     286589. 0.36%  0.6%    
## 18 Oth Bread               932       4.96     149552. 0.12%  0.31%   
## 19 Dietary supplements   13016       5.16      44916. 1.74%  0.09%   
## 20 Smoothies               137       2.93      17061. 0.02%  0.04%

1.2.2.3 Healthy foods Group 3 (n = 20)

TableFoogGroup %>% 
  filter(HealthPoints3g == 3) %>% 
  select(-lesshealthy, -neutral,-calcumprop, -healthy, -HealthPoints3g)
## # A tibble: 20 x 6
##    mfgLab                        n meanHpoint mfgCalories n.freq cal.Prop
##    <chr>                     <int>      <dbl>       <dbl> <chr>  <chr>   
##  1 Cakes & Pastries           7806       17.3    1710594. 1.04%  3.59%   
##  2 Biscuits                  13200       18.3    1662598. 1.76%  3.49%   
##  3 Cheese                    10983       21.5    1492015. 1.47%  3.13%   
##  4 JamsSpreads               37960       14.7    1215279. 5.07%  2.55%   
##  5 Chocolate                  6495       24.9    1046113. 0.87%  2.19%   
##  6 Butter                    10203       24.3     965901. 1.36%  2.02%   
##  7 Spreads less-fat          12620       23.4     848835. 1.68%  1.78%   
##  8 Crisps                     5664       13.0     835672. 0.76%  1.75%   
##  9 Sausages                   3025       15.3     775004. 0.4%   1.62%   
## 10 Meat pastries              1979       14.8     744640. 0.26%  1.56%   
## 11 Bacon and ham              8467       15.5     738727. 1.13%  1.55%   
## 12 Margarine                  8742       19.6     410108. 1.17%  0.86%   
## 13 Burgers/kebabs              939       14.6     328396. 0.13%  0.69%   
## 14 Ice cream                  1816       15.4     309564. 0.24%  0.65%   
## 15 Other meat                 1571       17.0     271445. 0.21%  0.57%   
## 16 Sugar confectionery        1820       14.5     164392. 0.24%  0.34%   
## 17 LowFat Spreads             3654       18.1     134527. 0.49%  0.28%   
## 18 Polyunsatu margarine       3179       20.0     126714. 0.42%  0.27%   
## 19 Liver                       454       13.6      67330. 0.06%  0.14%   
## 20 Commercial toddlers foods    66       18.5       1862. 0.01%  0%

2 CA analysis in all adults

2.1 All food group and 7 Eating Time slots

2.1.1 Contingency table of food groups and time slots:

Note that we have randomly splitted the food recording data sets into two subsets. From here we are using only the data set 1 for hypothesis generation.

library(FactoMineR)
library(factoextra)
load("../HFood.Rdata")
freqtab <- xtabs(~HFood$mfgLab + HFood$MealTimeSlot)
as.data.frame.matrix(freqtab) %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover"))
6am to 8:59am 9am to 11:59am 12 noon to 1:59pm 2pm to 4:59pm 5pm to 7:59pm 8pm to 9:59pm 10pm to 5:59am
1% milk 189 137 50 66 79 48 35
2% milk 7513 6844 3262 3986 3124 2530 1533
Artificial Sweeteners 920 832 467 591 410 337 219
Bacon and ham 209 757 1707 453 906 213 57
Beef 3 28 435 254 1462 306 38
Beer lager 11 34 253 440 1014 1467 826
Biscuits 417 1173 1130 1405 813 1013 614
Brown Bread 540 567 1073 287 363 178 87
Burgers/kebabs 0 14 112 81 219 49 12
Butter 812 876 1243 548 1085 385 145
Cakes & Pastries 182 597 778 891 857 465 177
Cheese 131 381 1916 656 1563 644 182
Chicken/turkey 19 96 1011 571 2039 544 103
Chips 19 96 624 442 1727 376 83
Chocolate 52 349 470 728 522 834 303
Coated Chicken 0 6 115 91 300 64 20
Commercial toddlers foods 3 3 15 6 11 4 0
Crisps 11 270 875 520 443 501 228
Diet soft drinks 361 679 1167 1076 1916 1199 674
Dietary supplements 4685 1244 137 74 121 121 179
Eggs 424 810 915 378 960 262 56
Fruit 2631 3012 3700 2341 2937 1793 518
Fruit juice 992 592 536 337 650 294 134
HiFi cereals 2534 1255 102 41 43 69 95
Ice cream 0 8 93 143 399 210 44
JamsSpreads 4639 4477 2283 2504 2518 1673 912
Lamb 1 3 113 72 296 99 16
Liver 10 14 72 20 76 23 2
LoFi cereals 1212 704 80 37 40 48 75
LowFat Spreads 330 323 533 151 309 101 45
Margarine 137 317 802 448 1946 663 91
Meat pastries 11 68 308 140 349 104 29
Misc./Vending 877 1608 5795 2720 9386 2990 859
Nuts and seeds 645 528 466 401 498 394 153
Oily fish 26 47 414 147 572 151 17
Oth Bread 76 79 162 51 70 19 13
Other meat 40 86 257 100 207 78 18
Other Milk Cream 610 535 446 431 780 386 139
Other white fish 8 58 604 194 673 244 39
Pasta & Rice 694 545 1574 925 3934 1259 270
Polyunsatu margarine 51 95 264 143 753 228 39
Pork 4 15 169 102 475 107 7
Potatos other 13 44 982 536 2987 434 36
Puddings 13 39 246 147 498 155 53
Reg soft drinks 295 551 1052 969 1396 920 527
Salad and raw veg 165 620 5822 1878 6086 1814 301
Sausages 70 266 301 151 578 111 15
Skimmed Milk 1416 1047 509 626 510 436 309
Smoothies 12 14 20 10 4 4 1
Spirits and liqueurs 3 9 31 71 297 518 403
Spreads less-fat 983 1262 1776 549 1049 424 190
Sugar confectionery 40 125 113 243 164 165 82
Tea/Coffee/Water 14297 16103 10587 11780 10414 7327 5544
Veg not raw 203 669 5299 2559 13693 3022 314
White Bread 1195 1775 2748 908 1643 660 280
White fish, shellfish 1 6 148 72 448 85 5
Whole Milk 1654 1584 792 851 919 645 442
Wine 3 11 184 178 1317 1376 376
WMeal Bread 683 674 1178 296 474 185 92
Yogurt 524 435 803 326 808 372 114

2.1.2 Foods and 7 Eating Time Slots

res.ca <- CA(as.data.frame.matrix(freqtab), graph = FALSE)
fviz_screeplot(res.ca, addlabels = TRUE)
Scree plot -- CA of the NDNS RP 9 year data, eating time slots and food goups.

Scree plot – CA of the NDNS RP 9 year data, eating time slots and food goups.

First two dimensions represents 84.2% of the inertia (variation in time slots profile).

fviz_ca_biplot(res.ca, repel = TRUE, title = "Biplot of Correspondence analysis for 60 food groups.") 

  • The horizontal axis contrasts the early time (am, and earlier than 6 am included) with later time (noon, afternoon, till 10 pm); and breakfast foods with the others.

  • The vertical axis shows large contribution from alcohol against the others.

2.1.3 Biplot by food healthiness (1)

2.1.3.1 Three healthy food only

HealthyFoods <- as.data.frame.matrix(freqtab)[rownames(as.data.frame.matrix(freqtab)) %in% c("Veg not raw", "Fruit", "Salad and raw veg"),]

Healthy.ca <- CA(HealthyFoods, graph = FALSE)
fviz_ca_biplot(Healthy.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis for 3 healthy food groups.") 

2.1.3.2 with confidence region (1000 bootstrapping method)

Healthy Foods with bootstrap 95% confidence regions for Food groups.

Healthy Foods with bootstrap 95% confidence regions for Food groups.

Healthy Foods with bootstrap 95% confidence regions for Time Slots.

Healthy Foods with bootstrap 95% confidence regions for Time Slots.

2.1.3.3 Neutral food (n = 26)

NeutralFoods <- as.data.frame.matrix(freqtab)[rownames(as.data.frame.matrix(freqtab)) %in% TableFoogGroup$mfgLab[TableFoogGroup$neutral],]

Neutral.ca <- CA(NeutralFoods, graph = FALSE)
fviz_ca_biplot(Neutral.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis for 26 neutral food groups.") 

2.1.3.4 with confidence region (1000 bootstrapping method)

Neutral Foods with bootstrap 95% confidence regions for Food groups.

Neutral Foods with bootstrap 95% confidence regions for Food groups.

Neutral Foods with bootstrap 95% confidence regions for Time Slots.

Neutral Foods with bootstrap 95% confidence regions for Time Slots.

2.1.3.5 less healthy food (n = 31)

LessFoods <- as.data.frame.matrix(freqtab)[rownames(as.data.frame.matrix(freqtab)) %in% TableFoogGroup$mfgLab[TableFoogGroup$lesshealthy],]

Less.ca <- CA(LessFoods, graph = FALSE)
fviz_ca_biplot(Less.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis for 31 less healthy food groups.") 

2.1.3.6 with confidence region (1000 bootstrapping method)

Less Healthy Foods with bootstrap 95% confidence regions for Food groups.

Less Healthy Foods with bootstrap 95% confidence regions for Food groups.

Less Healthy Foods with bootstrap 95% confidence regions for Time Slots.

Less Healthy Foods with bootstrap 95% confidence regions for Time Slots.

2.1.4 Biplot by food healthiness (2)

2.1.4.1 Food Healthiness Group 1

G1Foods <- as.data.frame.matrix(freqtab)[rownames(as.data.frame.matrix(freqtab)) %in% TableFoogGroup$mfgLab[TableFoogGroup$HealthPoints3g == 1],]

G1.ca <- CA(G1Foods, graph = FALSE)
fviz_ca_biplot(G1.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis for food group 1 (1st 20 healthy foods).") 

2.1.4.2 Food Healthiness Group 2

G2Foods <- as.data.frame.matrix(freqtab)[rownames(as.data.frame.matrix(freqtab)) %in% TableFoogGroup$mfgLab[TableFoogGroup$HealthPoints3g == 2],]

G2.ca <- CA(G2Foods, graph = FALSE)
fviz_ca_biplot(G2.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis for food group 2 (2nd 20 healthy foods).") 

2.1.4.3 Food Healthiness Group 3

G3Foods <- as.data.frame.matrix(freqtab)[rownames(as.data.frame.matrix(freqtab)) %in% TableFoogGroup$mfgLab[TableFoogGroup$HealthPoints3g == 3],]

G3.ca <- CA(G3Foods, graph = FALSE)
fviz_ca_biplot(G3.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis for food group 3 (3rd 20 healthy foods).") 

3 CA analysis by diabetes status

3.1 among diagnosed diabete patients

DiagDM <- as.logical(HFood$DM4cat.y == 3)
DiagDMtab <- xtabs(~HFood$mfgLab + HFood$MealTimeSlot, subset = DiagDM)
DiagDMmatrix <- matrix(data = DiagDMtab, nrow = 59, ncol = 7, 
                  dimnames = list(rownames(DiagDMtab), colnames(DiagDMtab)))

DiagDM.ca <- CA(DiagDMmatrix, graph = FALSE)
fviz_ca_biplot(DiagDM.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis among diagnosed DM.") 

3.2 among non-diabete participants

DiagDM <- as.logical(HFood$DM4cat.y == 0)
DiagDMtab <- xtabs(~HFood$mfgLab + HFood$MealTimeSlot, subset = DiagDM)
DiagDMmatrix <- matrix(data = DiagDMtab, nrow = 60, ncol = 7, 
                  dimnames = list(rownames(DiagDMtab), colnames(DiagDMtab)))

DiagDM.ca <- CA(DiagDMmatrix, graph = FALSE)
fviz_ca_biplot(DiagDM.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis among non-diabete participants.") 

3.3 among Pre-diabetes participants

DiagDM <- as.logical(HFood$DM4cat.y == 1)
DiagDMtab <- xtabs(~HFood$mfgLab + HFood$MealTimeSlot, subset = DiagDM)
DiagDMmatrix <- matrix(data = DiagDMtab, nrow = 59, ncol = 7, 
                  dimnames = list(rownames(DiagDMtab), colnames(DiagDMtab)))

DiagDM.ca <- CA(DiagDMmatrix, graph = FALSE)
fviz_ca_biplot(DiagDM.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis among Prediabetes participants.") 

3.4 among undiagnosed-diabetes participants

DiagDM <- as.logical(HFood$DM4cat.y == 2)
DiagDMtab <- xtabs(~HFood$mfgLab + HFood$MealTimeSlot, subset = DiagDM)
DiagDMmatrix <- matrix(data = DiagDMtab, nrow = 59, ncol = 7, 
                  dimnames = list(rownames(DiagDMtab), colnames(DiagDMtab)))

DiagDM.ca <- CA(DiagDMmatrix, graph = FALSE)
fviz_ca_biplot(DiagDM.ca, 
               repel = TRUE, title = "Biplot of Correspondence analysis among undiagnosed DM participants.")