By teeth: Caries prevalence by D1, D3, D5MFT by Age
Calculate the prevalence
NOTE For some reason, the following four chunks are not render correctly, hence I decided to not include in the rendered document. To run the script, delete the eval=FALSE at the start of the chunk
Age
CF
D1
D3
D5
F
M
Total
12
13.9%
19.8%
10.8%
20.0%
33.6%
1.9%
100.0%
15
6.7%
9.8%
7.1%
28.3%
44.3%
3.8%
100.0%
Analysis by teeth:
By surface: Caries prevalence by D1, D3, D5MFT by Age
Analysis by surface:
Caries Report for 12 years-old
Combined D1, D3, D5MFT by Gender, 15-year-old
Gender
D1MFT
D3MFT
D5MFT
Meitene
88.8%
70.1%
57.1%
Zēns
83.6%
62.7%
54.1%
Total
86.1%
66.3%
55.6%
Caries prevalence D1
Age
D1_prevalence
Gender
Caries
No Caries
Meitene
88.8% (672)
11.2% (85)
Zēns
83.6% (669)
16.4% (131)
Total
86.1% (1341)
13.9% (216)
Region
D1_prevalence
Region
Caries
No Caries
Rīga
82.5% (368)
17.5% (78)
Pierīga
82.1% (165)
17.9% (36)
Zemgale
95.5% (191)
4.5% (9)
Vidzeme
90.1% (245)
9.9% (27)
Kurzeme
82.2% (235)
17.8% (51)
Latgale
90.1% (137)
9.9% (15)
Total
86.1% (1341)
13.9% (216)
Place of living
D1_prevalence
Place of living
Caries
No Caries
Rīga
83.5% (339)
16.5% (67)
Pierīga
74.9% (134)
25.1% (45)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
89.5% (290)
10.5% (34)
Cita pilsēta
88.0% (374)
12.0% (51)
Lauki
91.5% (204)
8.5% (19)
Total
86.1% (1341)
13.9% (216)
Language
D1_prevalence
Language spoken iat home
Caries
No Caries
LV
86.0% (907)
14.0% (148)
LV-EN-Other
94.9% (56)
5.1% (3)
LV-RU
85.3% (378)
14.7% (65)
Total
86.1% (1341)
13.9% (216)
Caries prevalence D3
Age
D3_prevalence
Gender
Caries
No Caries
Meitene
70.1% (531)
29.9% (226)
Zēns
62.7% (502)
37.2% (298)
Total
66.3% (1033)
33.7% (524)
Region
D3_prevalence
Region
Caries
No Caries
Rīga
60.8% (271)
39.2% (175)
Pierīga
63.2% (127)
36.8% (74)
Zemgale
77.5% (155)
22.5% (45)
Vidzeme
70.2% (191)
29.8% (81)
Kurzeme
59.1% (169)
40.9% (117)
Latgale
78.9% (120)
21.1% (32)
Total
66.3% (1033)
33.7% (524)
Place of living
D3_prevalence
Place of living
Caries
No Caries
Rīga
61.6% (250)
38.4% (156)
Pierīga
53.6% (96)
46.4% (83)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
71.6% (232)
28.4% (92)
Cita pilsēta
67.8% (288)
32.2% (137)
Lauki
74.9% (167)
25.1% (56)
Total
66.3% (1033)
33.7% (524)
Language
D3_prevalence
Language spoken iat home
Caries
No Caries
LV
66.2% (698)
33.8% (357)
LV-EN-Other
74.6% (44)
25.4% (15)
LV-RU
65.7% (291)
34.3% (152)
Total
66.3% (1033)
33.7% (524)
Caries prevalence D5
Age
D5_prevalence
Gender
Caries
No Caries
Meitene
57.1% (432)
42.9% (325)
Zēns
54.1% (433)
45.9% (367)
Total
55.6% (865)
44.4% (692)
Region
D5_prevalence
Region
Caries
No Caries
Rīga
48.9% (218)
51.1% (228)
Pierīga
56.2% (113)
43.8% (88)
Zemgale
65.5% (131)
34.5% (69)
Vidzeme
63.2% (172)
36.8% (100)
Kurzeme
51.7% (148)
48.3% (138)
Latgale
54.6% (83)
45.4% (69)
Total
55.6% (865)
44.4% (692)
Place of living
D5_prevalence
Place of living
Caries
No Caries
Rīga
49.8% (202)
50.2% (204)
Pierīga
46.9% (84)
53.1% (95)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
59.6% (193)
40.4% (131)
Cita pilsēta
56.7% (241)
43.3% (184)
Lauki
65.0% (145)
35.0% (78)
Total
55.6% (865)
44.4% (692)
Language
D5_prevalence
Language spoken iat home
Caries
No Caries
LV
40.8% (430)
59.2% (625)
LV-EN-Other
28.8% (17)
71.2% (42)
LV-RU
37.0% (164)
63.0% (279)
Total
39.2% (611)
60.8% (946)
Caries severity (d1mft, d3mft, d5mft and d1mfs, d3mfs, d5mfs) by age and region / place of living / language
Age
Characteristic
12, N = 1,557
95% CI1
D1MFS
7.8, 8.6
Mean (SD)
8 (8)
Range
0, 64
D3MFS
3.2, 3.6
Mean (SD)
3.4 (4.8)
Range
0.0, 53.0
D5MFS
2.3, 2.8
Mean (SD)
2.5 (4.2)
Range
0.0, 53.0
D1MFT
5.1, 5.5
Mean (SD)
5.3 (4.6)
Range
0.0, 27.0
D3MFT
2.1, 2.4
Mean (SD)
2.26 (2.49)
Range
0.00, 15.00
D5MFT
1.5, 1.7
Mean (SD)
1.57 (1.99)
Range
0.00, 14.00
1 CI = Confidence Interval
Region
Characteristic
Rīga, N = 446
Pierīga, N = 201
Zemgale, N = 200
Vidzeme, N = 272
Kurzeme, N = 286
Latgale, N = 152
D1MFS
Mean (SD)
6 (6)
7 (7)
12 (8)
9 (10)
6 (7)
13 (10)
D3MFS
Mean (SD)
2.4 (3.3)
3.0 (4.4)
4.1 (4.2)
4.4 (6.8)
3.3 (4.7)
4.5 (4.7)
D5MFS
Mean (SD)
1.9 (2.9)
2.3 (3.8)
2.8 (3.6)
3.5 (6.3)
2.6 (4.2)
2.8 (3.7)
D1MFT
Mean (SD)
4.0 (4.0)
4.2 (3.8)
7.8 (4.8)
5.8 (4.5)
4.4 (4.0)
8.2 (5.8)
D3MFT
Mean (SD)
1.64 (1.95)
2.07 (2.48)
2.83 (2.50)
2.69 (2.92)
2.13 (2.54)
3.02 (2.54)
D5MFT
Mean (SD)
1.20 (1.63)
1.51 (2.00)
1.81 (1.95)
2.00 (2.34)
1.57 (2.07)
1.65 (2.01)
Place of living
Characteristic
Rīga, N = 406
Pierīga, N = 179
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL, N = 324
Cita pilsēta, N = 425
Lauki, N = 223
D1MFS
Mean (SD)
6 (6)
6 (7)
9 (7)
9 (9)
11 (10)
D3MFS
Mean (SD)
2.4 (3.2)
2.6 (4.4)
3.7 (4.2)
3.7 (5.2)
4.8 (6.5)
D5MFS
Mean (SD)
1.9 (2.9)
2.0 (3.8)
2.7 (3.7)
2.8 (4.6)
3.6 (5.9)
D1MFT
Mean (SD)
4.1 (4.0)
3.7 (4.1)
5.8 (4.5)
6.0 (5.0)
6.9 (4.9)
D3MFT
Mean (SD)
1.69 (1.99)
1.65 (2.33)
2.54 (2.35)
2.44 (2.63)
3.01 (3.01)
D5MFT
Mean (SD)
1.23 (1.66)
1.19 (1.79)
1.69 (1.94)
1.67 (2.08)
2.10 (2.43)
Language
Characteristic
LV, N = 1,055
LV-EN-Other, N = 59
LV-RU, N = 443
D1MFS
Mean (SD)
8 (8)
11 (10)
8 (8)
D3MFS
Mean (SD)
3.5 (4.9)
3.8 (6.7)
3.1 (4.1)
D5MFS
Mean (SD)
2.6 (4.3)
2.8 (6.6)
2.3 (3.5)
D1MFT
Mean (SD)
5.2 (4.5)
6.8 (4.9)
5.3 (4.8)
D3MFT
Mean (SD)
2.31 (2.56)
2.29 (2.51)
2.12 (2.30)
D5MFT
Mean (SD)
1.63 (2.03)
1.37 (2.38)
1.45 (1.83)
Caries Report for 15 years-old
Combined D1, D3, D5MFT by Gender, 15-year-old
Gender
D1MFT
D3MFT
D5MFT
Meitene
94.1%
83.7%
77.7%
Zēns
92.5%
83.2%
75.1%
Total
93.3%
83.5%
76.3%
Caries prevalence D1
Age
D1_prevalence
Gender
Caries
No Caries
Meitene
94.1% (705)
5.9% (44)
Zēns
92.5% (761)
7.5% (62)
Total
93.3% (1466)
6.7% (106)
Region
D1_prevalence
Region
Caries
No Caries
Rīga
90.7% (371)
9.3% (38)
Pierīga
92.2% (226)
7.8% (19)
Zemgale
94.1% (225)
5.9% (14)
Vidzeme
94.9% (241)
5.1% (13)
Kurzeme
92.5% (245)
7.5% (20)
Latgale
98.8% (158)
1.2% (2)
Total
93.3% (1466)
6.7% (106)
Place of living
D1_prevalence
Place of living
Caries
No Caries
Rīga
91.4% (317)
8.6% (30)
Pierīga
89.2% (190)
10.8% (23)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
96.9% (378)
3.1% (12)
Cita pilsēta
90.3% (352)
9.7% (38)
Lauki
98.7% (229)
1.3% (3)
Total
93.3% (1466)
6.7% (106)
Language
D1_prevalence
Language spoken iat home
Caries
No Caries
LV
93.4% (1019)
6.6% (72)
LV-EN-Other
92.5% (37)
7.5% (3)
LV-RU
93.0% (410)
7.0% (31)
Total
93.3% (1466)
6.7% (106)
Caries prevalence D3
Age
D3_prevalence
Gender
Caries
No Caries
Meitene
83.7% (627)
16.3% (122)
Zēns
83.2% (685)
16.8% (138)
Total
83.5% (1312)
16.5% (260)
Region
D3_prevalence
Region
Caries
No Caries
Rīga
80.2% (328)
19.8% (81)
Pierīga
81.2% (199)
18.8% (46)
Zemgale
85.8% (205)
14.2% (34)
Vidzeme
85.0% (216)
15.0% (38)
Kurzeme
82.3% (218)
17.7% (47)
Latgale
91.2% (146)
8.8% (14)
Total
83.5% (1312)
16.5% (260)
Place of living
D3_prevalence
Place of living
Caries
No Caries
Rīga
80.4% (279)
19.6% (68)
Pierīga
77.0% (164)
23.0% (49)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
91.8% (358)
8.2% (32)
Cita pilsēta
80.0% (312)
20.0% (78)
Lauki
85.8% (199)
14.2% (33)
Total
83.5% (1312)
16.5% (260)
Language
D3_prevalence
Language spoken iat home
Caries
No Caries
LV
82.6% (901)
17.4% (190)
LV-EN-Other
82.5% (33)
17.5% (7)
LV-RU
85.7% (378)
14.3% (63)
Total
83.5% (1312)
16.5% (260)
Caries prevalence D5
Age
D5_prevalence
Gender
Caries
No Caries
Meitene
77.7% (582)
22.3% (167)
Zēns
75.1% (618)
24.9% (205)
Total
76.3% (1200)
23.7% (372)
Region
D5_prevalence
Region
Caries
No Caries
Rīga
73.1% (299)
26.9% (110)
Pierīga
76.7% (188)
23.3% (57)
Zemgale
76.6% (183)
23.4% (56)
Vidzeme
82.7% (210)
17.3% (44)
Kurzeme
72.1% (191)
27.9% (74)
Latgale
80.6% (129)
19.4% (31)
Total
76.3% (1200)
23.7% (372)
Place of living
D5_prevalence
Place of living
Caries
No Caries
Rīga
72.9% (253)
27.1% (94)
Pierīga
72.8% (155)
27.2% (58)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
80.8% (315)
19.2% (75)
Cita pilsēta
74.4% (290)
25.6% (100)
Lauki
80.6% (187)
19.4% (45)
Total
76.3% (1200)
23.7% (372)
Language
D5_prevalence
Language spoken iat home
Caries
No Caries
LV
63.4% (692)
36.6% (399)
LV-EN-Other
75.0% (30)
25.0% (10)
LV-RU
62.6% (276)
37.4% (165)
Total
63.5% (998)
36.5% (574)
Caries severity (d1mft, d3mft, d5mft and d1mfs, d3mfs, d5mfs) by age and region / place of living / language
Caries severity by age
Caries severity surface by age
Age
Characteristic
15, N = 1,572
95% CI1
D1MFS
13, 14
Mean (SD)
13 (11)
Range
0, 63
D3MFS
6.4, 7.2
Mean (SD)
7 (7)
Range
0, 54
D5MFS
5.1, 5.7
Mean (SD)
5.4 (6.5)
Range
0.0, 50.0
D1MFT
8.0, 8.5
Mean (SD)
8.2 (5.7)
Range
0.0, 28.0
D3MFT
4.2, 4.6
Mean (SD)
4.4 (3.9)
Range
0.0, 22.0
D5MFT
3.2, 3.5
Mean (SD)
3.4 (3.3)
Range
0.0, 22.0
1 CI = Confidence Interval
Region
Characteristic
Rīga, N = 409
Pierīga, N = 245
Zemgale, N = 239
Vidzeme, N = 254
Kurzeme, N = 265
Latgale, N = 160
D1MFS
Mean (SD)
11 (10)
13 (11)
16 (12)
15 (11)
10 (9)
19 (11)
D3MFS
Mean (SD)
6 (7)
6 (7)
7 (7)
7 (8)
6 (7)
9 (7)
D5MFS
Mean (SD)
5.1 (6.7)
5.0 (6.0)
5.3 (6.1)
6.1 (6.8)
5.0 (6.6)
6.7 (6.1)
D1MFT
Mean (SD)
6.9 (5.0)
7.5 (5.6)
10.3 (6.5)
9.0 (5.4)
6.7 (4.6)
11.3 (5.8)
D3MFT
Mean (SD)
3.9 (3.7)
4.2 (3.8)
5.1 (4.3)
4.5 (3.8)
4.0 (3.7)
5.6 (3.7)
D5MFT
Mean (SD)
3.2 (3.3)
3.3 (3.4)
3.6 (3.5)
3.5 (3.2)
3.0 (3.3)
3.9 (3.3)
Place of living
Characteristic
Rīga, N = 347
Pierīga, N = 213
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL, N = 390
Cita pilsēta, N = 390
Lauki, N = 232
D1MFS
Mean (SD)
11 (10)
11 (10)
15 (11)
13 (11)
16 (11)
D3MFS
Mean (SD)
6 (8)
6 (6)
8 (7)
6 (7)
8 (8)
D5MFS
Mean (SD)
5.3 (7.0)
4.4 (5.4)
5.9 (5.9)
5.2 (6.6)
6.1 (7.0)
D1MFT
Mean (SD)
6.8 (5.1)
7.2 (5.4)
9.6 (5.9)
8.0 (6.0)
9.4 (5.2)
D3MFT
Mean (SD)
4.0 (3.8)
3.8 (3.5)
5.1 (3.9)
4.1 (3.8)
5.1 (4.1)
D5MFT
Mean (SD)
3.3 (3.5)
2.9 (3.0)
3.8 (3.4)
3.2 (3.2)
3.7 (3.4)
Language
Characteristic
LV, N = 1,091
LV-EN-Other, N = 40
LV-RU, N = 441
D1MFS
Mean (SD)
13 (11)
12 (9)
14 (11)
D3MFS
Mean (SD)
7 (7)
6 (5)
7 (7)
D5MFS
Mean (SD)
5.3 (6.4)
4.7 (4.3)
5.7 (6.7)
D1MFT
Mean (SD)
8.0 (5.6)
7.9 (5.5)
8.8 (5.8)
D3MFT
Mean (SD)
4.3 (3.9)
4.0 (3.3)
4.7 (3.9)
D5MFT
Mean (SD)
3.4 (3.3)
3.1 (2.4)
3.5 (3.4)
Tables of all conditions
Tables by Age
DMFT by Age
Age
Characteristic
12, N = 1,5571
15, N = 1,5721
A_teeth
3.05 (3.46)
3.82 (3.85)
B_teeth
0.69 (1.19)
1.05 (1.58)
C_teeth
0.27 (0.84)
0.42 (1.10)
RC_teeth
0.14 (0.56)
0.31 (1.09)
PFA_teeth
0.04 (0.29)
0.06 (0.34)
R_teeth
1.09 (1.62)
2.54 (2.88)
E_teeth
0.03 (0.21)
0.05 (0.29)
D1MFT
5.31 (4.64)
8.25 (5.68)
D3MFT
2.26 (2.49)
4.43 (3.86)
D5MFT
1.57 (1.99)
3.38 (3.34)
1 Mean (SD)
DMFS by Age
Age
Characteristic
12, N = 1,5571
15, N = 1,5721
A_surface
4.80 (5.56)
6.45 (6.44)
B_surface
0.85 (1.53)
1.39 (2.14)
C_surface
0.39 (1.41)
0.62 (1.81)
R_surface
1.61 (2.89)
3.76 (4.87)
RC_surface
0.21 (0.90)
0.52 (1.85)
E_surface
0.18 (1.27)
0.31 (1.63)
PFA_surface
0.15 (1.08)
0.21 (1.34)
D1MFS
8.20 (8.26)
13.25 (10.84)
D3MFS
3.40 (4.76)
6.80 (7.23)
D5MFS
2.55 (4.21)
5.41 (6.46)
1 Mean (SD)
Sealants by Age
Age
Characteristic
12, N = 1,5571
15, N = 1,5721
Ir_sīlants_prev
0.20 (0.91)
0.19 (0.91)
Ir bojāts sīlants, bet nav kariess prev
0
1,544 (99%)
1,562 (99%)
1
7 (0.4%)
8 (0.5%)
2
5 (0.3%)
1 (<0.1%)
3
1 (<0.1%)
1 (<0.1%)
Ir bojāts sīlants un kariess prev
0
1,547 (99%)
1,561 (99%)
1
7 (0.4%)
6 (0.4%)
2
3 (0.2%)
2 (0.1%)
3
0 (0%)
2 (0.1%)
5
0 (0%)
1 (<0.1%)
Sīlanti_summa
0.22 (0.97)
0.21 (0.95)
1 Mean (SD); n (%)
Trauma by Age
Age
Characteristic
12, N = 1,5571
15, N = 1,5721
Plombēts trauma_prev
0
1,538 (99%)
1,552 (99%)
1
13 (0.8%)
15 (1.0%)
2
5 (0.3%)
4 (0.3%)
3
1 (<0.1%)
1 (<0.1%)
KL_E trauma prev
0
1,511 (97%)
1,513 (96%)
1
41 (2.6%)
51 (3.2%)
2
3 (0.2%)
6 (0.4%)
3
2 (0.1%)
1 (<0.1%)
4
0 (0%)
1 (<0.1%)
KL_D trauma prev
0
1,526 (98%)
1,550 (99%)
1
24 (1.5%)
19 (1.2%)
2
7 (0.4%)
2 (0.1%)
3
0 (0%)
1 (<0.1%)
KL_P trauma prev
0
1,551 (100%)
1,560 (99%)
1
6 (0.4%)
10 (0.6%)
2
0 (0%)
2 (0.1%)
SL trauma prev
0
1,554 (100%)
1,569 (100%)
1
1 (<0.1%)
2 (0.1%)
2
2 (0.1%)
1 (<0.1%)
Luksācija trauma prev
0
1,554 (100%)
1,567 (100%)
1
1 (<0.1%)
5 (0.3%)
2
2 (0.1%)
0 (0%)
Zaudēts trauma prev
0
1,556 (100%)
1,570 (100%)
1
1 (<0.1%)
1 (<0.1%)
2
0 (0%)
1 (<0.1%)
Nr_teeth_trauma
0
1,457 (94%)
1,455 (93%)
1
74 (4.8%)
92 (5.9%)
2
18 (1.2%)
21 (1.3%)
3
8 (0.5%)
2 (0.1%)
4
0 (0%)
2 (0.1%)
1 n (%)
Toothbrushing frequency by Age
Age
Characteristic
Divas un vairākas reizes dienā, N = 1,5001
Reizi dienā - vakaros, N = 7711
Reizi dienā no rīta vai retāk nekā reizi dienā, N = 7351
Netīra, N = 1231
Vecums
12
694 (45%)
444 (29%)
343 (22%)
76 (4.9%)
15
806 (51%)
327 (21%)
392 (25%)
47 (3.0%)
1 n (%)
Toothpaste by Age
Age
Characteristic
Fluorīdi vismaz 1000 ppm, N = 1,3471
Fluorīdi līdz 1000 ppm, N = 991
Nezina, N = 1,6321
Fluorīdu nav, N = 511
Vecums
12
621 (40%)
48 (3.1%)
872 (56%)
16 (1.0%)
15
726 (46%)
51 (3.2%)
760 (48%)
35 (2.2%)
1 n (%)
Daily sugary drinks by Age
Age
Characteristic
No, N = 1,1301
Yes, N = 1,9991
Vecums
12
561 (36%)
996 (64%)
15
569 (36%)
1,003 (64%)
1 n (%)
Daily sweets by Age
Age
Characteristic
No, N = 8821
Yes, N = 2,2471
Vecums
12
464 (30%)
1,093 (70%)
15
418 (27%)
1,154 (73%)
1 n (%)
Annual dental / dental hygiene visits by Age
Age
Characteristic
Yes, N = 2,5991
No, N = 5301
Vecums
12
1,298 (83%)
259 (17%)
15
1,301 (83%)
271 (17%)
1 n (%)
Smoking or other tobacco at least once per week by Age
Age
Characteristic
No, N = 2,9201
Yes, N = 2091
Vecums
12
1,543 (99%)
14 (0.9%)
15
1,377 (88%)
195 (12%)
1 n (%)
Visible plaque by Age
Age
Characteristic
No, N = 1,7001
Yes, N = 1,4291
Vecums
12
781 (50%)
776 (50%)
15
919 (58%)
653 (42%)
1 n (%)
15. MIH by Age
Age
Characteristic
Jā, gan molāriem, gan incisīviem, N = 651
Jā, tikai molāri, N = 741
No, N = 2,9901
Vecums
12
36 (2.3%)
41 (2.6%)
1,480 (95%)
15
29 (1.8%)
33 (2.1%)
1,510 (96%)
1 n (%)
16. Fluorosis by Age
Age
Characteristic
fluorozes pazīmes (daži balti punktiņi vai balti plankumiņi), N = 631
ļoti viegla fluoroze (Mazas, necaurspīdīgas, papīrbaltas zonas, aizņem ne vairāk par 25% no zoba virsmas), N = 611
nav fluorozes pazīmju, N = 2,9851
vidēja fluoroze (skarta visa zoba virsma, izteikts nodilums uz kožamām virsmām, var būt brūna pigmentācija), N = 21
viegla fluoroze (Necaurspīdīgas, baltas zonas, aizņem ne vairāk par 50% no zoba virsmas), N = 181
Vecums
12
32 (2.1%)
28 (1.8%)
1,487 (96%)
0 (0%)
10 (0.6%)
15
31 (2.0%)
33 (2.1%)
1,498 (95%)
2 (0.1%)
8 (0.5%)
1 n (%)
17. Erosion TWI index by Age
Age
Characteristic
Emaljas struktūras izmaiņas, neliels formas zudums, N = 201
Emaljas zudums atsedz dentīnu – mazāk kā trešdaļa izmeklējamās virsmas, N = 11
Nav emaljas struktūras vai formas izmaiņu, N = 3,1071
Dentīns atsegts incisīvu incizālajās šķautnēs un premolāru un molāru pauguru virsotnēs, N = 331
Izzuduši premolāru un molāru pauguri, incisīvu nodilums nepārsniedz ½ no zoba garuma, N = 11
Nav abrāziju vai atrīciju, N = 1,5381
Dzīvesvieta
Rīga
1 (0.3%)
0 (0%)
346 (100%)
Pierīga
2 (0.9%)
0 (0%)
211 (99%)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
7 (1.8%)
1 (0.3%)
382 (98%)
Cita pilsēta
10 (2.6%)
0 (0%)
380 (97%)
Lauki
13 (5.6%)
0 (0%)
219 (94%)
1 n (%)
BPE_total by Place of living 15
15-Year-Old
Characteristic
0, N = 4151
1, N = 5771
2, N = 5791
3, N = 11
Dzīvesvieta
Rīga
36 (10%)
153 (44%)
158 (46%)
0 (0%)
Pierīga
38 (18%)
93 (44%)
82 (38%)
0 (0%)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
120 (31%)
145 (37%)
125 (32%)
0 (0%)
Cita pilsēta
135 (35%)
109 (28%)
146 (37%)
0 (0%)
Lauki
86 (37%)
77 (33%)
68 (29%)
1 (0.4%)
1 n (%)
Oral pathology by Place of living 15
15-Year-Old
Characteristic
No, N = 1,5401
Yes, N = 321
Dzīvesvieta
Rīga
344 (99%)
3 (0.9%)
Pierīga
211 (99%)
2 (0.9%)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
377 (97%)
13 (3.3%)
Cita pilsēta
386 (99%)
4 (1.0%)
Lauki
222 (96%)
10 (4.3%)
1 n (%)
Orthodontic treatment experience by Place of living 15
15-Year-Old
Characteristic
Nav ortodontiskās ārstēšanas pieredzes, N = 1,2771
Ortodontiskā ārstēšana plānota tuvākajā laikā, N = 751
Ortodontiskā ārstēšana tiek veikta šobrīd, N = 1161
Ortodontiskā ārstēšana veikta pagātnē, N = 1041
Dzīvesvieta
Rīga
264 (76%)
24 (6.9%)
28 (8.1%)
31 (8.9%)
Pierīga
156 (73%)
8 (3.8%)
25 (12%)
24 (11%)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
310 (79%)
17 (4.4%)
30 (7.7%)
33 (8.5%)
Cita pilsēta
327 (84%)
22 (5.6%)
26 (6.7%)
15 (3.8%)
Lauki
220 (95%)
4 (1.7%)
7 (3.0%)
1 (0.4%)
1 n (%)
Periodontal health by age and region / place of living / language
BPE by age
Age
Quadrant
12
15
11
19.6% (906)
21.5% (977)
16_17
17.2% (796)
17.7% (805)
26_27
16.0% (738)
16.1% (733)
31
14.2% (658)
13.4% (611)
36_37
16.8% (778)
16.0% (728)
46_47
16.1% (745)
15.3% (696)
Total
100.0% (4621)
100.0% (4550)
Age
Quadrant
12
15
11
16.3% (561)
14.6% (515)
16_17
16.8% (579)
16.7% (589)
26_27
17.1% (592)
18.0% (635)
31
13.8% (476)
12.7% (449)
36_37
17.7% (612)
18.8% (664)
46_47
18.3% (632)
19.2% (679)
Total
100.0% (3452)
100.0% (3531)
Age
Quadrant
12
15
11
7.1% (89)
5.9% (80)
16_17
14.3% (181)
13.1% (177)
26_27
17.9% (226)
15.1% (204)
31
33.5% (423)
37.9% (512)
36_37
13.1% (165)
13.3% (180)
46_47
14.1% (178)
14.6% (197)
Total
100.0% (1262)
100.0% (1350)
Age
Quadrant
12
15
11
16.7% (1)
0.0% (0)
16_17
0.0% (0)
100.0% (1)
26_27
16.7% (1)
0.0% (0)
31
0.0% (0)
0.0% (0)
36_37
33.3% (2)
0.0% (0)
46_47
33.3% (2)
0.0% (0)
Total
100.0% (6)
100.0% (1)
Age
Quadrant
12
15
11
0.0% (0)
- (0)
16_17
100.0% (1)
- (0)
26_27
0.0% (0)
- (0)
31
0.0% (0)
- (0)
36_37
0.0% (0)
- (0)
46_47
0.0% (0)
- (0)
Total
100.0% (1)
- (0)
Perio by Age
age/max_bpe
0
1
2
3
4
12
51.6% (442)
50.7% (594)
47.3% (519)
50.0% (1)
100.0% (1)
15
48.4% (415)
49.3% (577)
52.7% (579)
50.0% (1)
0.0% (0)
place_of_living/max_bpe
0
1
2
3
Rīga
8.7% (36)
26.5% (153)
27.3% (158)
0.0% (0)
Pierīga
9.2% (38)
16.1% (93)
14.2% (82)
0.0% (0)
DGP-JKP-JGA-JMA-LPJ-RZN-VMA-VSL
28.9% (120)
25.1% (145)
21.6% (125)
0.0% (0)
Cita pilsēta
32.5% (135)
18.9% (109)
25.2% (146)
0.0% (0)
Lauki
20.7% (86)
13.3% (77)
11.7% (68)
100.0% (1)
Risk factors
Prevalence of risk factors: Toothbrushing frequency Toothpaste Daily sugary drinks Daily sweets Annual dental / dental hygiene visits Smoking or other tobacco at least once per week Visible plaque
“Smoking or other tobacco at least once per week”, “Toothbrushing frequency” , “Toothpaste”, “Daily sugary drinks”, “Annual dental / dental hygiene visits” , “Daily sweets” , “Toothbrushing frequency”
Characteristic
12, N = 1,5571
15, N = 1,5721
Smēķēšana
14 (0.9%)
195 (12%)
Zobu sukošanas biežums
Divas un vairākas reizes dienā
694 (45%)
806 (51%)
Reizi dienā - vakaros
444 (29%)
327 (21%)
Reizi dienā no rīta vai retāk nekā reizi dienā
343 (22%)
392 (25%)
Netīra
76 (4.9%)
47 (3.0%)
Zobu pasta
Fluorīdi vismaz 1000 ppm
621 (40%)
726 (46%)
Fluorīdi līdz 1000 ppm
48 (3.1%)
51 (3.2%)
Nezina
872 (56%)
760 (48%)
Fluorīdu nav
16 (1.0%)
35 (2.2%)
Ikdienu saldētie dzērieni
996 (64%)
1,003 (64%)
Ikgadējās zobārstniecības / zobu higiēnas vizītes
1,298 (83%)
1,301 (83%)
Ikdienu saldumi
1,093 (70%)
1,154 (73%)
1 n (%)
Export the data to SPSS format
Source Code
---title: "03 Data Analysis Epidemiology Latvia 2023"date: 2023-08-15date-modified: last-modifieddate-format: "MMM D, YYYY, HH:mm"theme: default format:# docx: default# pdf: default html: toc: true toc-location: left embed-resources: truetoc-expand: 1code-fold: truecode-tools: trueeditor: sourceexecute: echo: false cache: true warning: false message: false---# PACKAGES & DATASETS```{r}pacman::p_load(tidyverse, performance, # Assessment of Regression Models Performance# expss, # for the labels# haven, # to keep the labels names# Hmisc, # for the labels# sjlabelled, # for the labels labelled, # for the labels using purrr, gt, knitr, tidymodels, sjPlot, scales, gtsummary, irr, # for agreement calculations patchwork, # for several plots viridis, # colour palette janitor, here)``````{r}theme_set(theme_minimal())```## Dataset for EPiLoad data for Epidemiological Analysis```{r}df <-read_rds(here("data", "df.rds")) # the rds file with the correct levels``````{r}# Will subset the dataset, only works with the csv file, not the rds# df <- df |> # select(-c(`17 [Distal]`:`Sealants[ 47]`))```Now subset only ages 12 and 15```{r}df <- df |>filter(Age %in%c("12", "15"))```## Labelling```{r}## For labelled packagedf <-set_variable_labels( df, Count ="Skaits",`Examen date`="Egzāmena datums",`Examen time`="Egzāmena laiks",Age ="Vecums",`Examiner code`="Egzaminatora kods",Region ="Reģions",`School code`="Skolas kods",`Child code`="Bērna kods",Examination ="Pārbaude",Gender ="Dzimums",`Date of birth`="Dzimšanas datums",`Language spoken iat home`="Mājās runātā valoda",`Place of living`="Dzīvesvieta",`Toothbrushing frequency`="Zobu sukošanas biežums",Toothpaste ="Zobu pasta",`Daily sugary drinks`="Ikdienu saldētie dzērieni",`Daily sweets`="Ikdienu saldumi",`Annual dental / dental hygiene visits`="Ikgadējās zobārstniecības / zobu higiēnas vizītes",`Smoking or other tobacco at least once per week`="Smēķēšana vai citu tabakas izstrādājumu lietošana vismaz reizi nedēļā",`Visible plaque`="Redzams zobu aplikums",Smoking ="Smēķēšana")```## Perio and BPEPrepare the data for Perio```{r}perio <- df |>select(`Language spoken iat home`, Region, `School code`, Gender, Age, `Place of living`, `Visible plaque`, "20. BPE [16/17]":"20. BPE [46/47]") |>clean_names() |>rowid_to_column("id") |>filter(age %in%c(12, 15)) |>mutate(school_code =as.factor(school_code))``````{r}# to later match with the bpe datasetid <- perio |>select(id:place_of_living)```| Scoring Codes | Clinical | Criteria ||-----------------|-----------------|--------------------------------------|| 0 | Pockets \<3.5mm | No calculus/overhangs, no bleeding on probing || | | (black band entirely visible) || 1 | Pockets \<3.5mm | No calculus/overhangs, bleeding on probing || | | (black band entirely visible) || 2 | Pockets \<3.5mm | Supra or subgingival calculus/overhangs || | | (black band entirely visible) || 3 | Probing depth | 3.5-5.5mm || | | (Black band partially visible, indicating pocket || | | of 4-5mm) || 4 | Probing depth | \>5.5mm || | | (Black band disappears, indicating a pocket of || | | 6mm or more) || 5 | Furcation involvement | |```{r}perio <- perio |>pivot_longer(cols =starts_with("x"),names_to ="bpe",values_to ="bpe_value") |>mutate(bpe =str_remove(bpe, "x20_")) |>extract(bpe, into =c("delete", "bpe"), regex ="^(.*?)_(.*)$", remove =FALSE) |>relocate(bpe_value, .after ="bpe") |>select(-delete)``````{r}bpe_per_id <- perio |>group_by(id, bpe) |>summarise(max_bpe =max(bpe_value)) |>pivot_wider(names_from = bpe, values_from = max_bpe)``````{r}bpe_per_id <- bpe_per_id |>mutate(max_bpe =max(across("11":"46_47")))```add the demographic information```{r}perio <- id |># select(id:place_of_living ) |> left_join(bpe_per_id, by ="id") |># select(-(ends_with(".y"))) |> rename_at(vars(ends_with(".x")), ~gsub("\\.x", "", .))``````{r}rm(id, bpe_per_id)```# EPIDEMIOLOGICAL ANALYSIS## Table 1 by Age```{r}df |>mutate(`School code`=as.factor(`School code`)) |>mutate(`School code`=fct_lump_prop( `School code`, prop =0.04)) |>select(Region, `School code`, Gender, Age, `Place of living`) |> gtsummary::tbl_summary(by = Age)```# Caries Report```{r}age_12 <- df |>filter(Age =="12")``````{r}age_15 <- df |>filter(Age =="15")```## Caries severity by age```{r}df|>select(Age, D1MFT:D5MFT) |>pivot_longer(-Age) |>ggplot(aes(x = name,y = value,fill =as.factor(Age))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.5) +# scale_y_log10() +labs(title ="Caries Severity by Age (Teeth)",x ="",y ="n",fill ="Age") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_by_age_teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}df|>select(Age, D1MFS:D5MFS) |>pivot_longer(-Age) |>ggplot(aes(x = name,y = value,fill =as.factor(Age))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.5) +# scale_y_log10() +labs(title ="Caries Severity by Age (Surfaces)",x ="",y ="n",fill ="Age") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_by_age_surface.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```### Figure Caries prevalence by D1, D3, D5MFT by Age#### By teeth: Caries prevalence by D1, D3, D5MFT by AgeCalculate the prevalence**NOTE** For some reason, the following four chunks are not render correctly, hence I decided to not include in the rendered document. To run the script, delete the *eval=FALSE* at the start of the chunk```{r}df |>select(Age, D1 = A_teeth, D3 = B_teeth, D5 = D5,F = R_teeth, M = E_teeth) |>rowwise() |>mutate(DMFT_by_children =case_when( M !=0~"M", D5 !=0~"D5", F !=0~"F", D3 !=0~"D3", D1 !=0~"D1",TRUE~"CF")) |>ungroup() |>select(Age, DMFT_by_children) |>tabyl(Age, DMFT_by_children) |>adorn_totals(where ="col") |>adorn_percentages() |>adorn_pct_formatting() |>kable()```Analysis by teeth:```{r, eval=FALSE}df |>select(Age, D1 = A_teeth, D3 = B_teeth, # D5 = ICDAS5_6,F = R_teeth, M = E_teeth) |>rowwise() |>mutate(DMFT_by_children =case_when( M !=0~"M", D5 !=0~"D5", F !=0~"F", D3 !=0~"D3", D1 !=0~"D1",TRUE~"CF")) |>ungroup() |>select(Age, DMFT_by_children) |>tabyl(Age, DMFT_by_children) |>adorn_totals(where ="col") |>adorn_percentages() |>adorn_pct_formatting() |>select(-Total) |>pivot_longer(-Age) |>mutate(percentage = readr::parse_number(value)/100) |>ggplot(aes(x =as.factor(Age), y = percentage, fill = name)) +geom_col() +# scale_fill_manual(# values = c("D1" = "#1f968b", # "D3" = "#2d708e", # "D5" = "#39558c", # "M" = "#453781", # "F" = "#481568", # "CF" = "#74d055"),# breaks = c("D1", "D3", "D5", "M", "F", "CF")# ) + scale_fill_viridis_d(direction =-1) +scale_y_continuous(labels = scales::percent) +labs(title ="Caries status of children by tooth, Latvia (2023)", x ="Age", y ="", fill ="Index (t)")``````{r}ggsave(here("figures", "teeth_prevalence_and_severity_caries_12_15_plot.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### By surface: Caries prevalence by D1, D3, D5MFT by Age```{r, eval=FALSE}df |>select(Age, D1 = A_surface, D3 = B_surface, D5 = d5_s,F = R_surface, M = E_surface) |>rowwise() |>mutate(DMFT_by_children =case_when( M !=0~"M", D5 !=0~"D5", F !=0~"F", D3 !=0~"D3", D1 !=0~"D1",TRUE~"CF")) |>ungroup() |>select(Age, DMFT_by_children) |>tabyl(Age, DMFT_by_children) |>adorn_totals(where ="col") |>adorn_percentages() |>adorn_pct_formatting() |>kable()```Analysis by surface:```{r}df |>select(Age, D1 = A_surface, D3 = B_surface, D5 = D5_s,F = R_surface, M = E_surface) |>rowwise() |>mutate(DMFT_by_children =case_when( M !=0~"M", D5 !=0~"D5", F !=0~"F", D3 !=0~"D3", D1 !=0~"D1",TRUE~"CF")) |>ungroup() |>select(Age, DMFT_by_children) |>tabyl(Age, DMFT_by_children) |>adorn_totals(where ="col") |>adorn_percentages() |>adorn_pct_formatting() |>select(-Total) |>pivot_longer(-Age) |>mutate(percentage = readr::parse_number(value)/100) |>ggplot(aes(x =as.factor(Age), y = percentage, fill = name)) +geom_col() +# scale_fill_manual(# values = c("D1" = "#1f968b", # "D3" = "#2d708e", # "D5" = "#39558c", # "M" = "#453781", # "F" = "#481568", # "CF" = "#74d055"),# breaks = c("D1", "D3", "D5", "M", "F", "CF")# ) + # geom_text(aes(label = sprintf("%.2f", percentage * 100), color = ""), # position = position_stack(vjust = 0.5), # size = 5, # check_overlap = TRUE) + # Avoid text overlapscale_fill_viridis_d(direction =-1) +scale_y_continuous(labels = scales::percent) +labs(title ="Caries status of children by surface, Latvia (2023)", x ="Age", y ="", fill ="Index (s)") +guides(color =FALSE) # Remove the color legend``````{r}ggsave(here("figures", "surface_prevalence_and_severity_caries_12_15_plot.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```## Caries Report for 12 years-old### Combined D1, D3, D5MFT by Gender, 15-year-old```{r}age_12 <- age_12 |>mutate(D1_prevalence =case_when(D1MFT >0~"Caries", TRUE~"No Caries"),D3_prevalence =case_when(D3MFT >0~"Caries", TRUE~"No Caries"),D5_prevalence =case_when(D5MFT >0~"Caries", TRUE~"No Caries") )# Extract the "Caries" column for each prevalence variable and combineresult <-list(D1MFT = age_12 |>tabyl(Gender, D1_prevalence) |>adorn_totals("row") |>adorn_percentages("row") |>select(Gender, D1MFT = Caries),D3MFT = age_12 |>tabyl(Gender, D3_prevalence) |>adorn_totals("row") |>adorn_percentages("row") |>select(Gender, D3MFT = Caries),D5MFT = age_12 |>tabyl(Gender, D5_prevalence) |>adorn_totals("row") |>adorn_percentages("row") |>select(Gender, D5MFT = Caries))final_result <-Reduce(function(x, y) left_join(x, y, by ="Gender"), result)# Display the tablefinal_result |>adorn_pct_formatting(digits =1) |> knitr::kable()``````{r}rm(result, final_result)```### Caries prevalence D1#### Age```{r}age_12 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Gender, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Region```{r}age_12 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Region, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Place of living```{r}age_12 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Place of living`, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Language```{r}age_12 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Language spoken iat home`, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```### Caries prevalence D3#### Age```{r}age_12 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Gender, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Region```{r}age_12 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Region, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Place of living```{r}age_12 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Place of living`, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Language```{r}age_12 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Language spoken iat home`, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```### Caries prevalence D5#### Age```{r}age_12 |>mutate(D5_prevalence =case_when( D5MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Gender, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Region```{r}age_12 |>mutate(D5_prevalence =case_when( D5MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Region, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Place of living```{r}age_12 |>mutate(D5_prevalence =case_when( D5MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Place of living`, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Language```{r}age_12 |>mutate(D5_prevalence =case_when( D5MFT >1~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Language spoken iat home`, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```### Caries severity (d1mft, d3mft, d5mft and d1mfs, d3mfs, d5mfs) by age and region / place of living / language#### Age```{r}age_12 |>select(Age, D1MFS:D5MFT) |> gtsummary::tbl_summary(by = Age, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})", "{min}, {max}"),missing ="no" ) |>add_ci() |>bold_labels()``````{r}age_12 |>select(Age, D1MFS:D5MFS) |>pivot_longer(-Age) |>ggplot(aes(x = name,y = value,fill =as.factor(Age))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.3) +# scale_y_log10() +labs(title ="Caries Severity by Age (Surfaces), 12 years-old",x ="",y ="n",fill ="Age") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_12 |>select(Age, D1MFT:D5MFT) |>pivot_longer(-Age) |>ggplot(aes(x = name,y = value,fill =as.factor(Age))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.3) +# scale_y_log10() +labs(title ="Caries Severity by Age (Teeth), 12 years-old",x ="",y ="n",fill ="Age") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Region```{r}age_12 |>select(Region, D1MFS:D5MFT) |> gtsummary::tbl_summary(by = Region, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})"),missing ="no" ) |># add_ci() |> bold_labels()# gtsummary::tbl_summary(by = Region) |> # add_ci()``````{r}age_12 |>select(Region, D1MFS:D5MFS) |>pivot_longer(-Region) |>ggplot(aes(x = name,y = value,fill =as.factor(Region))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="C", begin =0.1) +# scale_y_log10() +labs(title ="Caries Severity by Region (Surfaces), 12 years-old",x ="",y ="n",fill ="Region") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_region_surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_12 |>select(Region, D1MFT:D5MFT) |>pivot_longer(-Region) |>ggplot(aes(x = name,y = value,fill =as.factor(Region))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="C", begin =0.1) +# scale_y_log10() +labs(title ="Caries Severity by Region (Teeth), 12 years-old",x ="",y ="n",fill ="Region") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_region_teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Place of living```{r}age_12 |>select(`Place of living`, D1MFS:D5MFT) |> gtsummary::tbl_summary(by =`Place of living`, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})"),missing ="no" ) |># add_ci() |> bold_labels()# gtsummary::tbl_summary(by = `Place of living`) |> # add_ci()``````{r}age_12 |>select(`Place of living`, D1MFS:D5MFS) |>pivot_longer(-`Place of living`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Place of living`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Place of living` (Surfaces), 12 years-old",x ="",y ="n",fill ="`Place of living`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_place_surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_12 |>select(`Place of living`, D1MFT:D5MFT) |>pivot_longer(-`Place of living`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Place of living`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Place of living` (Teeth), 12 years-old",x ="",y ="n",fill ="`Place of living`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_region_teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Language```{r}age_12 |>select(`Language spoken iat home`, D1MFS:D5MFT) |> gtsummary::tbl_summary(by =`Language spoken iat home`, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})"),missing ="no" ) |># add_ci() |> bold_labels()# gtsummary::tbl_summary(by = `Language spoken iat home`) |> # add_ci()``````{r}age_12 |>select(`Language spoken iat home`, D1MFS:D5MFS) |>pivot_longer(-`Language spoken iat home`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Language spoken iat home`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Language spoken at home` (Surfaces), 12 years-old",x ="",y ="n",fill ="`Language`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_region__lang_surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_12 |>select(`Language spoken iat home`, D1MFT:D5MFT) |>pivot_longer(-`Language spoken iat home`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Language spoken iat home`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Language spoken at home` (Teeth), 12 years-old",x ="",y ="n",fill ="`Language`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_12_region__lang_teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```## Caries Report for 15 years-old### Combined D1, D3, D5MFT by Gender, 15-year-old```{r}age_15 <- age_15 |>mutate(D1_prevalence =case_when(D1MFT >0~"Caries", TRUE~"No Caries"),D3_prevalence =case_when(D3MFT >0~"Caries", TRUE~"No Caries"),D5_prevalence =case_when(D5MFT >0~"Caries", TRUE~"No Caries") )# Extract the "Caries" column for each prevalence variable and combineresult <-list(D1MFT = age_15 |>tabyl(Gender, D1_prevalence) |>adorn_totals("row") |>adorn_percentages("row") |>select(Gender, D1MFT = Caries),D3MFT = age_15 |>tabyl(Gender, D3_prevalence) |>adorn_totals("row") |>adorn_percentages("row") |>select(Gender, D3MFT = Caries),D5MFT = age_15 |>tabyl(Gender, D5_prevalence) |>adorn_totals("row") |>adorn_percentages("row") |>select(Gender, D5MFT = Caries))final_result <-Reduce(function(x, y) left_join(x, y, by ="Gender"), result)# Display the tablefinal_result |>adorn_pct_formatting(digits =1) |> knitr::kable()``````{r}rm(result, final_result)```### Caries prevalence D1#### Age```{r}age_15 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Gender, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Region```{r}age_15 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Region, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Place of living```{r}age_15 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Place of living`, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Language```{r}age_15 |>mutate(D1_prevalence =case_when( D1MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Language spoken iat home`, D1_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```### Caries prevalence D3#### Age```{r}age_15 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Gender, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Region```{r}age_15 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Region, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Place of living```{r}age_15 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Place of living`, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Language```{r}age_15 |>mutate(D3_prevalence =case_when( D3MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Language spoken iat home`, D3_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```### Caries prevalence D5#### Age```{r}age_15 |>mutate(D5_prevalence =case_when( D5MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Gender, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Region```{r}age_15 |>mutate(D5_prevalence =case_when( D5MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(Region, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Place of living```{r}age_15 |>mutate(D5_prevalence =case_when( D5MFT >0~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Place of living`, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```#### Language```{r}age_15 |>mutate(D5_prevalence =case_when( D5MFT >1~"Caries", TRUE~"No Caries" ) ) |>tabyl(`Language spoken iat home`, D5_prevalence) |>adorn_totals(c( "row")) |>adorn_percentages("row") |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title() |> knitr::kable()```### Caries severity (d1mft, d3mft, d5mft and d1mfs, d3mfs, d5mfs) by age and region / place of living / language#### Caries severity by age```{r}df |>select( Age,D1 = A_teeth,D3 = B_teeth,D5 = D5,F = R_teeth,M = E_teeth ) |>pivot_longer(-Age,names_to ="Index",values_to ="Values") |>group_by(Age, Index) |>summarise(Avg_Values =mean(Values, na.rm =TRUE)) |>ggplot(aes(x =as.factor(Age), y = Avg_Values, fill = Index)) +geom_col(position ="stack") +# geom_text(# aes(label = sprintf("%.2f", Avg_Values), color = ""),# position = position_stack(vjust = 0.5),# size = 5,# check_overlap = TRUE# ) + # avoid overlappinglabs(title ="Average DMFT values per Age",x ="Age",y ="Average Index Value") +scale_fill_viridis_d(direction =-1) +# scale_fill_brewer(palette = "Set1") +theme_minimal() +guides(colour =FALSE) # Remove the color legend``````{r}ggsave(here("figures", "average_severity_teeth__dmft_age.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Caries severity surface by age```{r}df |>select( Age,D1 = A_surface,D3 = B_surface,D5 = D5_s,F = R_surface,M = E_surface ) |>pivot_longer(-Age,names_to ="Index",values_to ="Values") |>group_by(Age, Index) |>summarise(Avg_Values =mean(Values, na.rm =TRUE)) |>ggplot(aes(x =as.factor(Age), y = Avg_Values, fill = Index)) +geom_col(position ="stack") +# geom_text(# aes(label = sprintf("%.2f", Avg_Values), color = ""),# position = position_stack(vjust = 0.5),# size = 5,# check_overlap = TRUE# ) + # avoid overlappinglabs(title ="Average DMFS values per Age",x ="Age",y ="Average Index Value") +scale_fill_viridis_d(direction =-1) +# scale_fill_brewer(palette = "Set1") +theme_minimal() +guides(colour =FALSE) # Remove the color legend``````{r}ggsave(here("figures", "average_severity_surface__dmfs_age.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Age```{r}age_15 |>select(Age, D1MFS:D5MFT) |> gtsummary::tbl_summary(by = Age, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})", "{min}, {max}"),missing ="no" ) |>add_ci() |>bold_labels()``````{r}age_15 |>select(Age, D1MFS:D5MFS) |>pivot_longer(-Age) |>ggplot(aes(x = name,y = value,fill =as.factor(Age))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.3) +# scale_y_log10() +labs(title ="Caries Severity by Age (Surfaces), 15 years-old",x ="",y ="n",fill ="Age") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_15 |>select(Age, D1MFT:D5MFT) |>pivot_longer(-Age) |>ggplot(aes(x = name,y = value,fill =as.factor(Age))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.3) +# scale_y_log10() +labs(title ="Caries Severity by Age (Teeth), 15 years-old",x ="",y ="n",fill ="Age") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Region```{r}age_15 |>select(Region, D1MFS:D5MFT) |> gtsummary::tbl_summary(by = Region, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})"),missing ="no" ) |># add_ci() |> bold_labels()# gtsummary::tbl_summary(by = Region) |> # add_ci()``````{r}age_15 |>select(Region, D1MFS:D5MFS) |>pivot_longer(-Region) |>ggplot(aes(x = name,y = value,fill =as.factor(Region))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="C", begin =0.1) +# scale_y_log10() +labs(title ="Caries Severity by Region (Surfaces), 15 years-old",x ="",y ="n",fill ="Region") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_region__surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_15 |>select(Region, D1MFT:D5MFT) |>pivot_longer(-Region) |>ggplot(aes(x = name,y = value,fill =as.factor(Region))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="C", begin =0.1) +# scale_y_log10() +labs(title ="Caries Severity by Region (Teeth), 15 years-old",x ="",y ="n",fill ="Region") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_region__teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Place of living```{r}age_15 |>select(`Place of living`, D1MFS:D5MFT) |> gtsummary::tbl_summary(by =`Place of living`, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})"),missing ="no" ) |># add_ci() |> bold_labels()# gtsummary::tbl_summary(by = `Place of living`) |> # add_ci()``````{r}age_15 |>select(`Place of living`, D1MFS:D5MFS) |>pivot_longer(-`Place of living`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Place of living`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Place of living` (Surfaces), 15 years-old",x ="",y ="n",fill ="`Place of living`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_place__surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_15 |>select(`Place of living`, D1MFT:D5MFT) |>pivot_longer(-`Place of living`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Place of living`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Place of living` (Teeth), 15 years-old",x ="",y ="n",fill ="`Place of living`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_place_teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```#### Language```{r}age_15 |>select(`Language spoken iat home`, D1MFS:D5MFT) |> gtsummary::tbl_summary(by =`Language spoken iat home`, type =all_continuous() ~"continuous2",statistic =all_continuous() ~c("{mean} ({sd})"),missing ="no" ) |># add_ci() |> bold_labels()# gtsummary::tbl_summary(by = `Language spoken iat home`) |> # add_ci()``````{r}age_15 |>select(`Language spoken iat home`, D1MFS:D5MFS) |>pivot_longer(-`Language spoken iat home`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Language spoken iat home`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Language spoken at home` (Surfaces), 15 years-old",x ="",y ="n",fill ="`Language`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_lang__surfaces.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)``````{r}age_15 |>select(`Language spoken iat home`, D1MFT:D5MFT) |>pivot_longer(-`Language spoken iat home`) |>ggplot(aes(x = name,y = value,fill =as.factor(`Language spoken iat home`))) +geom_boxplot(outlier.alpha =0.1) +scale_fill_viridis_d(option ="viridis", begin =0.0) +# scale_y_log10() +labs(title ="Caries Severity by `Language spoken at home` (Teeth), 15 years-old",x ="",y ="n",fill ="`Language`") +theme(legend.position ="top")``````{r}ggsave(here("figures", "caries_severity_age_15_lang__teeth.png"), device ="png", width =8.27, height =11.69, units ="in", dpi =600)```# Tables of all conditions## Tables by Age#### DMFT by Age```{r}df |>select(Age, A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT) |>mutate(across(c(A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT), as.numeric)) |> gtsummary::tbl_summary(by = Age,type =list(B_teeth ~"continuous", C_teeth ~"continuous", RC_teeth ~"continuous", PFA_teeth ~"continuous", R_teeth ~"continuous", E_teeth ~"continuous", R_teeth ~"continuous", D1MFT ~"continuous", D3MFT ~"continuous", D5MFT ~"continuous") , statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**Age**")```#### DMFS by Age```{r}df |>select(Age, A_surface, B_surface, C_surface, R_surface, RC_surface, E_surface, PFA_surface, D1MFS, D3MFS, D5MFS) |>mutate(across(c(A_surface, B_surface, C_surface, R_surface, RC_surface, E_surface, PFA_surface, D1MFS, D3MFS, D5MFS), as.numeric)) |> gtsummary::tbl_summary(by = Age,type =list( A_surface ~"continuous", B_surface ~"continuous", C_surface ~"continuous", R_surface ~"continuous", E_surface ~"continuous", RC_surface ~"continuous", E_surface ~"continuous", PFA_surface ~"continuous", D1MFS ~"continuous", D3MFS ~"continuous", D5MFS ~"continuous" ),statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**Age**")```#### Sealants by Age```{r}df |># filter(Age == 12) |>select( Age,"Ir_sīlants_prev","Ir bojāts sīlants, bet nav kariess prev","Ir bojāts sīlants un kariess prev","Sīlanti_summa" ) |> gtsummary::tbl_summary(by = Age,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**Age**")```#### Trauma by Age```{r}df |># filter(Age == 12) |>select( Age,"Plombēts trauma_prev","KL_E trauma prev","KL_D trauma prev","KL_P trauma prev","SL trauma prev","Luksācija trauma prev","Zaudēts trauma prev","Nr_teeth_trauma" ) |> gtsummary::tbl_summary(by = Age,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**Age**")```#### Toothbrushing frequency by Age```{r}df |>select(`Toothbrushing frequency`, Age) |> gtsummary::tbl_summary(percent ="row",by =`Toothbrushing frequency`) |>modify_caption("**Age**")```#### Toothpaste by Age```{r}df |>select(Toothpaste, Age) |> gtsummary::tbl_summary(percent ="row",by = Toothpaste)|>modify_caption("**Age**")```#### Daily sugary drinks by Age```{r}df |>select(`Daily sugary drinks`, Age) |> gtsummary::tbl_summary(percent ="row",by =`Daily sugary drinks`)|>modify_caption("**Age**")```#### Daily sweets by Age```{r}df |>select(`Daily sweets`, Age) |> gtsummary::tbl_summary(percent ="row",by =`Daily sweets`)|>modify_caption("**Age**")```#### Annual dental / dental hygiene visits by Age```{r}df |>select(`Annual dental / dental hygiene visits`, Age) |> gtsummary::tbl_summary(percent ="row",by =`Annual dental / dental hygiene visits`)|>modify_caption("**Age**")```#### Smoking or other tobacco at least once per week by Age```{r}df |>select(Smoking, Age) |> gtsummary::tbl_summary(percent ="row",by = Smoking)|>modify_caption("**Age**")```#### Visible plaque by Age```{r}df |>select(`Visible plaque`, Age) |> gtsummary::tbl_summary(percent ="row",by =`Visible plaque`)|>modify_caption("**Age**")```#### 15. MIH by Age```{r}df |>select( `15. MIH` , Age) |> gtsummary::tbl_summary(percent ="row",by =`15. MIH`)|>modify_caption("**Age**")```#### 16. Fluorosis by Age```{r}df |>select( `16. Fluorosis` , Age) |> gtsummary::tbl_summary(percent ="row",by =`16. Fluorosis`)|>modify_caption("**Age**")```#### 17. Erosion TWI index by Age```{r}df |>select( `17. ErosionTWI index` , Age) |> gtsummary::tbl_summary(percent ="row",by =`17. ErosionTWI index`)|>modify_caption("**Age**")```#### Abrasion / attrition by Age```{r}df |>select( `Abrasion / attrition` , Age) |> gtsummary::tbl_summary(percent ="row",by =`Abrasion / attrition`)|>modify_caption("**Age**")```#### BPE_total by Age```{r}df |>select( BPE_total , Age) |> gtsummary::tbl_summary(percent ="row",by = BPE_total)|>modify_caption("**Age**")```#### Oral pathology by Age```{r}df |>select( Pathology , Age) |> gtsummary::tbl_summary(percent ="row",by = Pathology)|>modify_caption("**Age**")```#### Orthodontic treatment experience by Age```{r}df |>select( `Orthodontic treatment experience` , Age) |> gtsummary::tbl_summary(percent ="row",by =`Orthodontic treatment experience`)|>modify_caption("**Age**")```## Tables 12-year-old### By Gender 12#### DMFT by gender 12```{r}df |>filter(Age ==12) |>select(Gender, A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT) |>mutate(across(c(A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT), as.numeric)) |> gtsummary::tbl_summary(by = Gender,type =list(B_teeth ~"continuous", C_teeth ~"continuous", RC_teeth ~"continuous", PFA_teeth ~"continuous", R_teeth ~"continuous", R_teeth ~"continuous", E_teeth ~"continuous", D1MFT ~"continuous", D3MFT ~"continuous", D5MFT ~"continuous") , statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### DMFS by gender 12```{r}df |>filter(Age ==12) |>select(Gender, A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS) |>mutate(across(c(A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS), as.numeric)) |> gtsummary::tbl_summary(by = Gender,type =list( A_surface ~"continuous", B_surface ~"continuous", C_surface ~"continuous", R_surface ~"continuous", E_surface ~"continuous", E_surface ~"continuous", RC_surface ~"continuous", PFA_surface ~"continuous", D1MFS ~"continuous", D3MFS ~"continuous", D5MFS ~"continuous" ),statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Sealants by gender 12```{r}df |>filter(Age ==12) |>select( Gender,"Ir_sīlants_prev","Ir bojāts sīlants, bet nav kariess prev","Ir bojāts sīlants un kariess prev","Sīlanti_summa" ) |> gtsummary::tbl_summary(by = Gender,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Trauma by gender 12```{r}df |>filter(Age ==12) |>select( Gender,"Plombēts trauma_prev","KL_E trauma prev","KL_D trauma prev","KL_P trauma prev","SL trauma prev","Luksācija trauma prev","Zaudēts trauma prev","Nr_teeth_trauma" ) |> gtsummary::tbl_summary(by = Gender,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Toothbrushing frequency by gender 12```{r}df |>filter(Age ==12) |>select(`Toothbrushing frequency`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Toothbrushing frequency`) |>modify_caption("**12-Year-Old**")```#### Toothpaste by gender 12```{r}df |>filter(Age ==12) |>select(Toothpaste, Gender) |> gtsummary::tbl_summary(percent ="row",by = Toothpaste)|>modify_caption("**12-Year-Old**")```#### Daily sugary drinks by gender 12```{r}df |>filter(Age ==12) |>select(`Daily sugary drinks`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Daily sugary drinks`)|>modify_caption("**12-Year-Old**")```#### Daily sweets by gender 12```{r}df |>filter(Age ==12) |>select(`Daily sweets`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Daily sweets`)|>modify_caption("**12-Year-Old**")```#### Annual dental / dental hygiene visits by gender 12```{r}df |>filter(Age ==12) |>select(`Annual dental / dental hygiene visits`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Annual dental / dental hygiene visits`)|>modify_caption("**12-Year-Old**")```#### Smoking or other tobacco at least once per week by gender 12```{r}df |>filter(Age ==12) |>select(Smoking, Gender) |> gtsummary::tbl_summary(percent ="row",by = Smoking)|>modify_caption("**12-Year-Old**")```#### Visible plaque by gender 12```{r}df |>filter(Age ==12) |>select(`Visible plaque`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Visible plaque`)|>modify_caption("**12-Year-Old**")```#### 15. MIH by gender 12```{r}df |>filter(Age ==12) |>select( `15. MIH` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`15. MIH`)|>modify_caption("**12-Year-Old**")```#### 16. Fluorosis by gender 12```{r}df |>filter(Age ==12) |>select( `16. Fluorosis` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`16. Fluorosis`)|>modify_caption("**12-Year-Old**")```#### 17. Erosion TWI index by gender 12```{r}df |>filter(Age ==12) |>select( `17. ErosionTWI index` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`17. ErosionTWI index`)|>modify_caption("**12-Year-Old**")```#### Abrasion / attrition by gender 12```{r}df |>filter(Age ==12) |>select( `Abrasion / attrition` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`Abrasion / attrition`)|>modify_caption("**12-Year-Old**")```#### BPE_total by gender 12```{r}df |>filter(Age ==12) |>select( BPE_total , Gender) |> gtsummary::tbl_summary(percent ="row",by = BPE_total)|>modify_caption("**12-Year-Old**")```#### Oral pathology by gender 12```{r}df |>filter(Age ==12) |>select( Pathology , Gender) |> gtsummary::tbl_summary(percent ="row",by = Pathology)|>modify_caption("**12-Year-Old**")```#### Orthodontic treatment experience by gender 12```{r}df |>filter(Age ==12) |>select( `Orthodontic treatment experience` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`Orthodontic treatment experience`)|>modify_caption("**12-Year-Old**")```### By region 12#### DMFT by region 12```{r}df |>filter(Age ==12) |>select(Region, A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT) |>mutate(across(c(A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT), as.numeric)) |> gtsummary::tbl_summary(by = Region,type =list(B_teeth ~"continuous", C_teeth ~"continuous", RC_teeth ~"continuous", PFA_teeth ~"continuous", R_teeth ~"continuous", R_teeth ~"continuous", E_teeth ~"continuous", D1MFT ~"continuous", D3MFT ~"continuous", D5MFT ~"continuous") , statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### DMFS by region 12```{r}df |>filter(Age ==12) |>select(Region, A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS) |>mutate(across(c(A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS), as.numeric)) |> gtsummary::tbl_summary(by = Region,type =list( A_surface ~"continuous", B_surface ~"continuous", C_surface ~"continuous", R_surface ~"continuous", E_surface ~"continuous", E_surface ~"continuous", RC_surface ~"continuous", PFA_surface ~"continuous", D1MFS ~"continuous", D3MFS ~"continuous", D5MFS ~"continuous" ),statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Sealants by region 12```{r}df |>filter(Age ==12) |>select( Region,"Ir_sīlants_prev","Ir bojāts sīlants, bet nav kariess prev","Ir bojāts sīlants un kariess prev","Sīlanti_summa" ) |> gtsummary::tbl_summary(by = Region,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Trauma by region 12```{r}df |>filter(Age ==12) |>select( Region,"Plombēts trauma_prev","KL_E trauma prev","KL_D trauma prev","KL_P trauma prev","SL trauma prev","Luksācija trauma prev","Zaudēts trauma prev","Nr_teeth_trauma" ) |> gtsummary::tbl_summary(by = Region,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Toothbrushing frequency by region 12```{r}df |>filter(Age ==12) |>select(`Toothbrushing frequency`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Toothbrushing frequency`) |>modify_caption("**12-Year-Old**")```#### Toothpaste by region 12```{r}df |>filter(Age ==12) |>select(Toothpaste, Region) |> gtsummary::tbl_summary(percent ="row",by = Toothpaste)|>modify_caption("**12-Year-Old**")```#### Daily sugary drinks by region 12```{r}df |>filter(Age ==12) |>select(`Daily sugary drinks`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Daily sugary drinks`)|>modify_caption("**12-Year-Old**")```#### Daily sweets by region 12```{r}df |>filter(Age ==12) |>select(`Daily sweets`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Daily sweets`)|>modify_caption("**12-Year-Old**")```#### Annual dental / dental hygiene visits by region 12```{r}df |>filter(Age ==12) |>select(`Annual dental / dental hygiene visits`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Annual dental / dental hygiene visits`)|>modify_caption("**12-Year-Old**")```#### Smoking or other tobacco at least once per week by region 12```{r}df |>filter(Age ==12) |>select(Smoking, Region) |> gtsummary::tbl_summary(percent ="row",by = Smoking)|>modify_caption("**12-Year-Old**")```#### Visible plaque by region 12```{r}df |>filter(Age ==12) |>select(`Visible plaque`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Visible plaque`)|>modify_caption("**12-Year-Old**")```#### 15. MIH by region 12```{r}df |>filter(Age ==12) |>select( `15. MIH` , Region) |> gtsummary::tbl_summary(percent ="row",by =`15. MIH`)|>modify_caption("**12-Year-Old**")```#### 16. Fluorosis by region 12```{r}df |>filter(Age ==12) |>select( `16. Fluorosis` , Region) |> gtsummary::tbl_summary(percent ="row",by =`16. Fluorosis`)|>modify_caption("**12-Year-Old**")```#### 17. Erosion TWI index by region 12```{r}df |>filter(Age ==12) |>select( `17. ErosionTWI index` , Region) |> gtsummary::tbl_summary(percent ="row",by =`17. ErosionTWI index`)|>modify_caption("**12-Year-Old**")```#### Abrasion / attrition by region 12```{r}df |>filter(Age ==12) |>select( `Abrasion / attrition` , Region) |> gtsummary::tbl_summary(percent ="row",by =`Abrasion / attrition`)|>modify_caption("**12-Year-Old**")```#### BPE_total by region 12```{r}df |>filter(Age ==12) |>select( BPE_total , Region) |> gtsummary::tbl_summary(percent ="row",by = BPE_total)|>modify_caption("**12-Year-Old**")```#### Oral pathology by region 12```{r}df |>filter(Age ==12) |>select( Pathology , Region) |> gtsummary::tbl_summary(percent ="row",by = Pathology)|>modify_caption("**12-Year-Old**")```#### Orthodontic treatment experience by region 12```{r}df |>filter(Age ==12) |>select( `Orthodontic treatment experience` , Region) |> gtsummary::tbl_summary(percent ="row",by =`Orthodontic treatment experience`)|>modify_caption("**12-Year-Old**")```### By place of living 12#### DMFT by place of living 12```{r}df |>filter(Age ==12) |>select(`Place of living`, A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT) |>mutate(across(c(A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT), as.numeric)) |> gtsummary::tbl_summary(by =`Place of living`,type =list(B_teeth ~"continuous", C_teeth ~"continuous", RC_teeth ~"continuous", PFA_teeth ~"continuous", R_teeth ~"continuous", E_teeth ~"continuous", D1MFT ~"continuous", D3MFT ~"continuous", D5MFT ~"continuous") , statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### DMFS by place of living 12```{r}df |>filter(Age ==12) |>select(`Place of living`, A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS) |>mutate(across(c(A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS), as.numeric)) |> gtsummary::tbl_summary(by =`Place of living`,type =list( A_surface ~"continuous", B_surface ~"continuous", C_surface ~"continuous", R_surface ~"continuous", E_surface ~"continuous", RC_surface ~"continuous", PFA_surface ~"continuous", D1MFS ~"continuous", D3MFS ~"continuous", D5MFS ~"continuous" ),statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Sealants by place of living 12```{r}df |>filter(Age ==12) |>select(`Place of living`,"Ir_sīlants_prev","Ir bojāts sīlants, bet nav kariess prev","Ir bojāts sīlants un kariess prev","Sīlanti_summa" ) |> gtsummary::tbl_summary(by =`Place of living`,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Trauma by place of living 12```{r}df |>filter(Age ==12) |>select(`Place of living`,"KL_E trauma prev","KL_D trauma prev","KL_P trauma prev","SL trauma prev","Luksācija trauma prev","Zaudēts trauma prev","Nr_teeth_trauma" ) |> gtsummary::tbl_summary(by =`Place of living`,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Toothbrushing frequency by place of living 12```{r}df |>filter(Age ==12) |>select(`Toothbrushing frequency`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Toothbrushing frequency`) |>modify_caption("**12-Year-Old**")```#### Toothpaste by place of living 12```{r}df |>filter(Age ==12) |>select(Toothpaste, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = Toothpaste)|>modify_caption("**12-Year-Old**")```#### Daily sugary drinks by place of living 12```{r}df |>filter(Age ==12) |>select(`Daily sugary drinks`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Daily sugary drinks`)|>modify_caption("**12-Year-Old**")```#### Daily sweets by place of living 12```{r}df |>filter(Age ==12) |>select(`Daily sweets`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Daily sweets`)|>modify_caption("**12-Year-Old**")```#### Annual dental / dental hygiene visits by place of living 12```{r}df |>filter(Age ==12) |>select(`Annual dental / dental hygiene visits`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Annual dental / dental hygiene visits`)|>modify_caption("**12-Year-Old**")```#### Smoking or other tobacco at least once per week by place of living 12```{r}df |>filter(Age ==12) |>select(Smoking, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = Smoking)|>modify_caption("**12-Year-Old**")```#### Visible plaque by place of living 12```{r}df |>filter(Age ==12) |>select(`Visible plaque`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Visible plaque`)|>modify_caption("**12-Year-Old**")```#### 15. MIH by place of living 12```{r}df |>filter(Age ==12) |>select( `15. MIH` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`15. MIH`)|>modify_caption("**12-Year-Old**")```#### 16. Fluorosis by place of living 12```{r}df |>filter(Age ==12) |>select( `16. Fluorosis` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`16. Fluorosis`)|>modify_caption("**12-Year-Old**")```#### 17. ErosionTWI index by place of living 12```{r}df |>filter(Age ==12) |>select( `17. ErosionTWI index` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`17. ErosionTWI index`)|>modify_caption("**12-Year-Old**")```#### Abrasion / attrition by place of living 12```{r}df |>filter(Age ==12) |>select( `Abrasion / attrition` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Abrasion / attrition`)|>modify_caption("**12-Year-Old**")```#### BPE_total by place of living 12```{r}df |>filter(Age ==12) |>select( BPE_total , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = BPE_total)|>modify_caption("**12-Year-Old**")```#### Oral pathology by place of living 12```{r}df |>filter(Age ==12) |>select( Pathology , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = Pathology)|>modify_caption("**12-Year-Old**")```#### Orthodontic treatment experience by place of living 12```{r}df |>filter(Age ==12) |>select( `Orthodontic treatment experience` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Orthodontic treatment experience`)|>modify_caption("**12-Year-Old**")```## Tables 15-year-old### By gender 15#### DMFT by gender 15```{r}df |>filter(Age ==15) |>select(Gender, A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT) |>mutate(across(c(A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT), as.numeric)) |> gtsummary::tbl_summary(by = Gender,type =list(B_teeth ~"continuous", C_teeth ~"continuous", RC_teeth ~"continuous", PFA_teeth ~"continuous", R_teeth ~"continuous", R_teeth ~"continuous", E_teeth ~"continuous", D1MFT ~"continuous", D3MFT ~"continuous", D5MFT ~"continuous") , statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### DMFS by gender 15```{r}df |>filter(Age ==15) |>select(Gender, A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS) |>mutate(across(c(A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS), as.numeric)) |> gtsummary::tbl_summary(by = Gender,type =list( A_surface ~"continuous", B_surface ~"continuous", C_surface ~"continuous", R_surface ~"continuous", E_surface ~"continuous", E_surface ~"continuous", RC_surface ~"continuous", PFA_surface ~"continuous", D1MFS ~"continuous", D3MFS ~"continuous", D5MFS ~"continuous" ),statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### Sealants by gender 15```{r}df |>filter(Age ==15) |>select( Gender,"Ir_sīlants_prev","Ir bojāts sīlants, bet nav kariess prev","Ir bojāts sīlants un kariess prev","Sīlanti_summa" ) |> gtsummary::tbl_summary(by = Gender,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### Trauma by gender 15```{r}df |>filter(Age ==15) |>select( Gender,"Plombēts trauma_prev","KL_E trauma prev","KL_D trauma prev","KL_P trauma prev","SL trauma prev","Luksācija trauma prev","Zaudēts trauma prev","Nr_teeth_trauma" ) |> gtsummary::tbl_summary(by = Gender,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### Toothbrushing frequency by gender 15```{r}df |>filter(Age ==15) |>select(`Toothbrushing frequency`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Toothbrushing frequency`) |>modify_caption("**15-Year-Old**")```#### Toothpaste by gender 15```{r}df |>filter(Age ==15) |>select(Toothpaste, Gender) |> gtsummary::tbl_summary(percent ="row",by = Toothpaste)|>modify_caption("**15-Year-Old**")```#### Daily sugary drinks by gender 15```{r}df |>filter(Age ==15) |>select(`Daily sugary drinks`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Daily sugary drinks`)|>modify_caption("**15-Year-Old**")```#### Daily sweets by gender 15```{r}df |>filter(Age ==15) |>select(`Daily sweets`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Daily sweets`)|>modify_caption("**15-Year-Old**")```#### Annual dental / dental hygiene visits by gender 15```{r}df |>filter(Age ==15) |>select(`Annual dental / dental hygiene visits`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Annual dental / dental hygiene visits`)|>modify_caption("**15-Year-Old**")```#### Smoking or other tobacco at least once per week by gender 15```{r}df |>filter(Age ==15) |>select(Smoking, Gender) |> gtsummary::tbl_summary(percent ="row",by = Smoking)|>modify_caption("**15-Year-Old**")```#### Visible plaque by gender 15```{r}df |>filter(Age ==15) |>select(`Visible plaque`, Gender) |> gtsummary::tbl_summary(percent ="row",by =`Visible plaque`)|>modify_caption("**15-Year-Old**")```#### 15. MIH by gender 15```{r}df |>filter(Age ==15) |>select( `15. MIH` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`15. MIH`)|>modify_caption("**15-Year-Old**")```#### 16. Fluorosis by gender 15```{r}df |>filter(Age ==15) |>select( `16. Fluorosis` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`16. Fluorosis`)|>modify_caption("**15-Year-Old**")```#### 17. ErosionTWI index by gender 15```{r}df |>filter(Age ==15) |>select( `17. ErosionTWI index` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`17. ErosionTWI index`)|>modify_caption("**15-Year-Old**")```#### Abrasion / attrition by gender 15```{r}df |>filter(Age ==15) |>select( `Abrasion / attrition` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`Abrasion / attrition`)|>modify_caption("**15-Year-Old**")```#### BPE_total by gender 15```{r}df |>filter(Age ==15) |>select( BPE_total , Gender) |> gtsummary::tbl_summary(percent ="row",by = BPE_total)|>modify_caption("**15-Year-Old**")```#### Oral pathology by gender 15```{r}df |>filter(Age ==15) |>select( Pathology , Gender) |> gtsummary::tbl_summary(percent ="row",by = Pathology)|>modify_caption("**15-Year-Old**")```#### Orthodontic treatment experience by gender 15```{r}df |>filter(Age ==15) |>select( `Orthodontic treatment experience` , Gender) |> gtsummary::tbl_summary(percent ="row",by =`Orthodontic treatment experience`)|>modify_caption("**15-Year-Old**")```### By region 15#### DMFT by region 15```{r}df |>filter(Age ==15) |>select(Region, A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT) |>mutate(across(c(A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT), as.numeric)) |> gtsummary::tbl_summary(by = Region,type =list(B_teeth ~"continuous", C_teeth ~"continuous", RC_teeth ~"continuous", PFA_teeth ~"continuous", R_teeth ~"continuous", R_teeth ~"continuous", E_teeth ~"continuous", D1MFT ~"continuous", D3MFT ~"continuous", D5MFT ~"continuous") , statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### DMFS by region 15```{r}df |>filter(Age ==15) |>select(Region, A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS) |>mutate(across(c(A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS), as.numeric)) |> gtsummary::tbl_summary(by = Region,type =list( A_surface ~"continuous", B_surface ~"continuous", C_surface ~"continuous", R_surface ~"continuous", E_surface ~"continuous", E_surface ~"continuous", RC_surface ~"continuous", PFA_surface ~"continuous", D1MFS ~"continuous", D3MFS ~"continuous", D5MFS ~"continuous" ),statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### Sealants by Region 15```{r}df |>filter(Age ==15) |>select( Region,"Ir_sīlants_prev","Ir bojāts sīlants, bet nav kariess prev","Ir bojāts sīlants un kariess prev","Sīlanti_summa" ) |> gtsummary::tbl_summary(by = Region,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### Trauma by Region 15```{r}df |>filter(Age ==15) |>select( Region,"Plombēts trauma_prev","KL_E trauma prev","KL_D trauma prev","KL_P trauma prev","SL trauma prev","Luksācija trauma prev","Zaudēts trauma prev","Nr_teeth_trauma" ) |> gtsummary::tbl_summary(by = Region,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### Toothbrushing frequency by Region 15```{r}df |>filter(Age ==15) |>select(`Toothbrushing frequency`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Toothbrushing frequency`) |>modify_caption("**15-Year-Old**")```#### Toothpaste by Region 15```{r}df |>filter(Age ==15) |>select(Toothpaste, Region) |> gtsummary::tbl_summary(percent ="row",by = Toothpaste)|>modify_caption("**15-Year-Old**")```#### Daily sugary drinks by Region 15```{r}df |>filter(Age ==15) |>select(`Daily sugary drinks`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Daily sugary drinks`)|>modify_caption("**15-Year-Old**")```#### Daily sweets by Region 15```{r}df |>filter(Age ==15) |>select(`Daily sweets`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Daily sweets`)|>modify_caption("**15-Year-Old**")```#### Annual dental / dental hygiene visits by Region 15```{r}df |>filter(Age ==15) |>select(`Annual dental / dental hygiene visits`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Annual dental / dental hygiene visits`)|>modify_caption("**15-Year-Old**")```#### Smoking or other tobacco at least once per week by Region 15```{r}df |>filter(Age ==15) |>select(Smoking, Region) |> gtsummary::tbl_summary(percent ="row",by = Smoking)|>modify_caption("**15-Year-Old**")```#### Visible plaque by Region 15```{r}df |>filter(Age ==15) |>select(`Visible plaque`, Region) |> gtsummary::tbl_summary(percent ="row",by =`Visible plaque`)|>modify_caption("**15-Year-Old**")```#### 15. MIH by Region 15```{r}df |>filter(Age ==15) |>select( `15. MIH` , Region) |> gtsummary::tbl_summary(percent ="row",by =`15. MIH`)|>modify_caption("**15-Year-Old**")```#### 16. Fluorosis by Region 15```{r}df |>filter(Age ==15) |>select( `16. Fluorosis` , Region) |> gtsummary::tbl_summary(percent ="row",by =`16. Fluorosis`)|>modify_caption("**15-Year-Old**")```#### 17. Erosion TWI index by Region 15```{r}df |>filter(Age ==15) |>select( `17. ErosionTWI index` , Region) |> gtsummary::tbl_summary(percent ="row",by =`17. ErosionTWI index`)|>modify_caption("**15-Year-Old**")```#### Abrasion / attrition by Region 15```{r}df |>filter(Age ==15) |>select( `Abrasion / attrition` , Region) |> gtsummary::tbl_summary(percent ="row",by =`Abrasion / attrition`)|>modify_caption("**15-Year-Old**")```#### BPE_total by Region 15```{r}df |>filter(Age ==15) |>select( BPE_total , Region) |> gtsummary::tbl_summary(percent ="row",by = BPE_total)|>modify_caption("**15-Year-Old**")```#### Oral pathology by Region 15```{r}df |>filter(Age ==15) |>select( Pathology , Region) |> gtsummary::tbl_summary(percent ="row",by = Pathology)|>modify_caption("**15-Year-Old**")```#### Orthodontic treatment experience by Region 15```{r}df |>filter(Age ==15) |>select( `Orthodontic treatment experience` , Region) |> gtsummary::tbl_summary(percent ="row",by =`Orthodontic treatment experience`)|>modify_caption("**15-Year-Old**")```### By place of living 15#### DMFT by place of living 15```{r}df |>filter(Age ==15) |>select(`Place of living`, A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT) |>mutate(across(c(A_teeth, B_teeth, C_teeth, RC_teeth, PFA_teeth, R_teeth, E_teeth, D1MFT, D3MFT, D5MFT), as.numeric)) |> gtsummary::tbl_summary(by =`Place of living`,type =list(B_teeth ~"continuous", C_teeth ~"continuous", RC_teeth ~"continuous", PFA_teeth ~"continuous", R_teeth ~"continuous", E_teeth ~"continuous", D1MFT ~"continuous", D3MFT ~"continuous", D5MFT ~"continuous") , statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### DMFS by place of living 15```{r}df |>filter(Age ==15) |>select(`Place of living`, A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS) |>mutate(across(c(A_surface, B_surface, C_surface, R_surface, E_surface, RC_surface, PFA_surface, D1MFS, D3MFS, D5MFS), as.numeric)) |> gtsummary::tbl_summary(by =`Place of living`,type =list( A_surface ~"continuous", B_surface ~"continuous", C_surface ~"continuous", R_surface ~"continuous", E_surface ~"continuous", RC_surface ~"continuous", PFA_surface ~"continuous", D1MFS ~"continuous", D3MFS ~"continuous", D5MFS ~"continuous" ),statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**15-Year-Old**")```#### Sealants by Place of living 15```{r}df |>filter(Age ==12) |>select(`Place of living`,"Ir_sīlants_prev","Ir bojāts sīlants, bet nav kariess prev","Ir bojāts sīlants un kariess prev","Sīlanti_summa" ) |> gtsummary::tbl_summary(by =`Place of living`,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Trauma by Place of living 15```{r}df |>filter(Age ==12) |>select(`Place of living`,"Plombēts trauma_prev","KL_E trauma prev","KL_D trauma prev","KL_P trauma prev","SL trauma prev","Luksācija trauma prev","Zaudēts trauma prev","Nr_teeth_trauma" ) |> gtsummary::tbl_summary(by =`Place of living`,statistic =all_continuous() ~"{mean} ({sd})",digits =all_continuous() ~2 ) |>modify_caption("**12-Year-Old**")```#### Toothbrushing frequency by Place of living 15```{r}df |>filter(Age ==15) |>select(`Toothbrushing frequency`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Toothbrushing frequency`) |>modify_caption("**15-Year-Old**")```#### Toothpaste by Place of living 15```{r}df |>filter(Age ==15) |>select(Toothpaste, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = Toothpaste)|>modify_caption("**15-Year-Old**")```#### Daily sugary drinks by Place of living 15```{r}df |>filter(Age ==15) |>select(`Daily sugary drinks`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Daily sugary drinks`)|>modify_caption("**15-Year-Old**")```#### Daily sweets by Place of living 15```{r}df |>filter(Age ==15) |>select(`Daily sweets`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Daily sweets`)|>modify_caption("**15-Year-Old**")```#### Annual dental / dental hygiene visits by Place of living 15```{r}df |>filter(Age ==15) |>select(`Annual dental / dental hygiene visits`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Annual dental / dental hygiene visits`)|>modify_caption("**15-Year-Old**")```#### Smoking or other tobacco at least once per week by Place of living 15```{r}df |>filter(Age ==15) |>select(Smoking, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = Smoking)|>modify_caption("**15-Year-Old**")```#### Visible plaque by Place of living 15```{r}df |>filter(Age ==15) |>select(`Visible plaque`, `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Visible plaque`)|>modify_caption("**15-Year-Old**")```#### 15. MIH by Place of living 15```{r}df |>filter(Age ==15) |>select( `15. MIH` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`15. MIH`)|>modify_caption("**15-Year-Old**")```#### 16. Fluorosis by Place of living 15```{r}df |>filter(Age ==15) |>select( `16. Fluorosis` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`16. Fluorosis`)|>modify_caption("**15-Year-Old**")```#### 17. ErosionTWI index by Place of living 15```{r}df |>filter(Age ==15) |>select( `17. ErosionTWI index` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`17. ErosionTWI index`)|>modify_caption("**15-Year-Old**")```#### Abrasion / attrition by Place of living 15```{r}df |>filter(Age ==15) |>select( `Abrasion / attrition` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Abrasion / attrition`)|>modify_caption("**15-Year-Old**")```#### BPE_total by Place of living 15```{r}df |>filter(Age ==15) |>select( BPE_total , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = BPE_total)|>modify_caption("**15-Year-Old**")```#### Oral pathology by Place of living 15```{r}df |>filter(Age ==15) |>select( Pathology , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by = Pathology)|>modify_caption("**15-Year-Old**")```#### Orthodontic treatment experience by Place of living 15```{r}df |>filter(Age ==15) |>select( `Orthodontic treatment experience` , `Place of living`) |> gtsummary::tbl_summary(percent ="row",by =`Orthodontic treatment experience`)|>modify_caption("**15-Year-Old**")```------------------------------------------------------------------------# Periodontal health by age and region / place of living / language## BPE by age```{r}perio |>select(Age = age, `11`, `16_17`, `26_27`, `31`, `36_37`, `46_47`) |>pivot_longer(-Age, names_to ="Quadrant", values_to ="Value") |>mutate(Value =as.character(Value)) |>tabyl(Quadrant, Age, Value) |>adorn_totals(where =c("row")) |>adorn_percentages("col") |>adorn_pct_formatting() |>adorn_ns() |>adorn_title() |>kable()```## Perio by Age```{r}perio |>select(age, max_bpe) |>tabyl(age, max_bpe) |>adorn_percentages("col") |># adorn_totals(c("row")) |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title("combined") |> knitr::kable()``````{r}perio |>filter(age ==15) |>select(place_of_living, max_bpe) |>tabyl(place_of_living, max_bpe) |>adorn_percentages("col") |># adorn_totals(c("row")) |>adorn_pct_formatting(digits =1) |>adorn_ns() |>adorn_title("combined") |> knitr::kable()```------------------------------------------------------------------------# Risk factors## Prevalence of risk factors: Toothbrushing frequency Toothpaste Daily sugary drinks Daily sweets Annual dental / dental hygiene visits Smoking or other tobacco at least once per week Visible plaque"Smoking or other tobacco at least once per week", "Toothbrushing frequency" , "Toothpaste", "Daily sugary drinks", "Annual dental / dental hygiene visits" , "Daily sweets" , "Toothbrushing frequency"```{r}df |>select( Age,"Smoking","Toothbrushing frequency" ,"Toothpaste","Daily sugary drinks","Annual dental / dental hygiene visits" ,"Daily sweets" ,"Toothbrushing frequency" ) |> gtsummary::tbl_summary(by = Age)```------------------------------------------------------------------------# Export the data to SPSS format```{r}pacman::p_load(haven)``````{r}df |> janitor::clean_names() |>write_sav(here("data", "df.sav"))```