require(tidyverse)
require(stringr)
require(forcats)
library(knitr)
require(broom)
locale("lv", asciify = TRUE)
options(digits=3)
df <- read_csv("Dataset/Dati_anketas_dzemdibu_iestades_v2.csv")
renombro columnas
colnames(df) <- str_replace_all(colnames(df), "[? .]", "_")
colnames(df) <- str_replace(colnames(df), "Vieta,_kur_anketa_pildīta", "Pildita")
df$Pildita <- str_replace(df$Pildita, "cccc", "P.Stradiņa klīniskā universitātes slimnīca")
hist(df$Attitude, breaks = 4,
main = "Attitude", xlab = "Attitude")
hist(df$Knowledge, breaks = 7,
main = "Knowledge", xlab = "Knowledge")
Convertir attitude y knowledge en porcentaje
df <- df %>%
mutate(AttPerc = Attitude/4*100)
df <- df %>%
mutate(KnoPerc = Knowledge/8*100)
hist(df$AttPerc, breaks = 5,
main = "Attitude", xlab = "Attitude percentage")
hist(df$KnoPerc, breaks = 10,
main = "Knowledge", xlab = "Knowledge percentage")
Descriptivo de todo en porcentaje
| important | not important | |
|---|---|---|
| < 30 gadi | 89.9 | 10.1 |
| > 30 gadi | 93.4 | 6.6 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`6__Is_it_important_to_take_care_about_deciduous_teeth_`)
X-squared = 6, df = 1, p-value = 0.02
| Juice or other drinks with sugar | Just water or herbal tea without sugar | |
|---|---|---|
| < 30 gadi | 12.08 | 87.9 |
| > 30 gadi | 7.45 | 92.5 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`7__Before_going_to_sleep,_what_could_you_offer_for_your_2-year_old_child_`)
X-squared = 9, df = 1, p-value = 0.003
| after eruption of the first milk tooth | don't know | |
|---|---|---|
| < 30 gadi | 36.2 | 63.8 |
| > 30 gadi | 48.3 | 51.7 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`8__In_which_age_you_should_begin_to_brush_your_childs_teeth_`)
X-squared = 20, df = 1, p-value = 1e-06
| don't know | toothbrush and toothpaste | |
|---|---|---|
| < 30 gadi | 74.3 | 25.7 |
| > 30 gadi | 77.1 | 22.9 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`9__What_would_you_have_to_use_for_brushing_your_childs_first_teeth_`)
X-squared = 2, df = 1, p-value = 0.2
| don' t know | toothpaste with fluorides | |
|---|---|---|
| < 30 gadi | 48.2 | 51.8 |
| > 30 gadi | 38.0 | 62.0 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`10__Which_toothpaste_would_you_choose_for_your_childs_first_teeth_`)
X-squared = 20, df = 1, p-value = 7e-05
| do not agree | don't know or agree | |
|---|---|---|
| < 30 gadi | 32.5 | 67.5 |
| > 30 gadi | 42.5 | 57.5 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`12__Fluoride_toothpaste_is_bad_for_my_child`)
X-squared = 20, df = 1, p-value = 5e-05
| 1000 ppm | don't know | |
|---|---|---|
| < 30 gadi | 1.279 | 98.7 |
| > 30 gadi | 0.916 | 99.1 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`13__How_much_fluoride_should_a_0-3-year_old_childs_toothpaste_contain_`)
X-squared = 0.2, df = 1, p-value = 0.7
| don't know | pea size or as rice grain | |
|---|---|---|
| < 30 gadi | 10.91 | 89.1 |
| > 30 gadi | 9.01 | 91.0 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`17__How_much_toothpastes_should_be_squeezed_out_on_a_toothbrush_`)
X-squared = 1, df = 1, p-value = 0.2
| don't know | pēc vajadzības kad bērns atļauj tīrīt | twice daily | |
|---|---|---|---|
| < 30 gadi | 30.8 | 0.11 | 69.1 |
| > 30 gadi | 28.6 | 0.00 | 71.4 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$Age_groups, df$`18_1_How_many_times_per_day_you_should_brush_your_childs_teeth_`)
X-squared = 2, df = 2, p-value = 0.5
| do not agree | don' t know or agree | |
|---|---|---|
| < 30 gadi | 60.4 | 39.6 |
| > 30 gadi | 59.3 | 40.7 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`19__Toothbrushing_against_a_childs’_will_is_aggression_towards_a_child_`)
X-squared = 0.2, df = 1, p-value = 0.7
| do not agree | don' t know or agree | |
|---|---|---|
| < 30 gadi | 89.5 | 10.5 |
| > 30 gadi | 89.6 | 10.4 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$Age_groups, df$`20__It_is_better_to_not_to_brush_against_childs_will_as_the_milk_teeth_will_fall_out_anyway_`)
X-squared = 0, df = 1, p-value = 1
| important | not important | |
|---|---|---|
| Lauku teritorija | 90.7 | 9.33 |
| Pilsēta | 90.3 | 9.69 |
| Rīga vai Rīgas rajons | 95.2 | 4.85 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`6__Is_it_important_to_take_care_about_deciduous_teeth_`)
X-squared = 7, df = 2, p-value = 0.02
| Juice or other drinks with sugar | Just water or herbal tea without sugar | |
|---|---|---|
| Lauku teritorija | 14.51 | 85.5 |
| Pilsēta | 9.75 | 90.2 |
| Rīga vai Rīgas rajons | 4.54 | 95.5 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`7__Before_going_to_sleep,_what_could_you_offer_for_your_2-year_old_child_`)
X-squared = 20, df = 2, p-value = 2e-05
| after eruption of the first milk tooth | don't know | |
|---|---|---|
| Lauku teritorija | 36.9 | 63.1 |
| Pilsēta | 39.6 | 60.4 |
| Rīga vai Rīgas rajons | 51.2 | 48.8 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`8__In_which_age_you_should_begin_to_brush_your_childs_teeth_`)
X-squared = 20, df = 2, p-value = 1e-04
| don't know | toothbrush and toothpaste | |
|---|---|---|
| Lauku teritorija | 79.0 | 21.0 |
| Pilsēta | 73.9 | 26.1 |
| Rīga vai Rīgas rajons | 73.6 | 26.4 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`9__What_would_you_have_to_use_for_brushing_your_childs_first_teeth_`)
X-squared = 5, df = 2, p-value = 0.08
| don' t know | toothpaste with fluorides | |
|---|---|---|
| Lauku teritorija | 48.0 | 52.0 |
| Pilsēta | 42.1 | 57.9 |
| Rīga vai Rīgas rajons | 43.0 | 57.0 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`10__Which_toothpaste_would_you_choose_for_your_childs_first_teeth_`)
X-squared = 5, df = 2, p-value = 0.1
| do not agree | don't know or agree | |
|---|---|---|
| Lauku teritorija | 35.3 | 64.7 |
| Pilsēta | 34.0 | 66.0 |
| Rīga vai Rīgas rajons | 44.9 | 55.1 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`12__Fluoride_toothpaste_is_bad_for_my_child`)
X-squared = 10, df = 2, p-value = 0.002
| 1000 ppm | don't know | |
|---|---|---|
| Lauku teritorija | 1.365 | 98.6 |
| Pilsēta | 0.671 | 99.3 |
| Rīga vai Rīgas rajons | 1.852 | 98.1 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$Lives_in, df$`13__How_much_fluoride_should_a_0-3-year_old_childs_toothpaste_contain_`)
X-squared = 3, df = 2, p-value = 0.2
| don't know | pea size or as rice grain | |
|---|---|---|
| Lauku teritorija | 7.51 | 92.5 |
| Pilsēta | 12.65 | 87.4 |
| Rīga vai Rīgas rajons | 8.36 | 91.6 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`17__How_much_toothpastes_should_be_squeezed_out_on_a_toothbrush_`)
X-squared = 10, df = 2, p-value = 0.006
| don't know | pēc vajadzības kad bērns atļauj tīrīt | twice daily | |
|---|---|---|---|
| Lauku teritorija | 31.5 | 0.000 | 68.5 |
| Pilsēta | 28.2 | 0.135 | 71.7 |
| Rīga vai Rīgas rajons | 31.3 | 0.000 | 68.7 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$Lives_in, df$`18_1_How_many_times_per_day_you_should_brush_your_childs_teeth_`)
X-squared = 3, df = 4, p-value = 0.6
| do not agree | don' t know or agree | |
|---|---|---|
| Lauku teritorija | 56.2 | 43.8 |
| Pilsēta | 56.9 | 43.1 |
| Rīga vai Rīgas rajons | 72.7 | 27.3 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`19__Toothbrushing_against_a_childs’_will_is_aggression_towards_a_child_`)
X-squared = 30, df = 2, p-value = 1e-06
| do not agree | don' t know or agree | |
|---|---|---|
| Lauku teritorija | 88.7 | 11.3 |
| Pilsēta | 88.7 | 11.3 |
| Rīga vai Rīgas rajons | 92.9 | 7.1 |
Pearson's Chi-squared test
data: table(df$Lives_in, df$`20__It_is_better_to_not_to_brush_against_childs_will_as_the_milk_teeth_will_fall_out_anyway_`)
X-squared = 5, df = 2, p-value = 0.09
| important | not important | |
|---|---|---|
| No | 92.5 | 7.47 |
| Yes, first child | 89.6 | 10.36 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`6__Is_it_important_to_take_care_about_deciduous_teeth_`)
X-squared = 4, df = 1, p-value = 0.05
| Juice or other drinks with sugar | Just water or herbal tea without sugar | |
|---|---|---|
| No | 9.88 | 90.1 |
| Yes, first child | 11.02 | 89.0 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`7__Before_going_to_sleep,_what_could_you_offer_for_your_2-year_old_child_`)
X-squared = 0.4, df = 1, p-value = 0.5
| after eruption of the first milk tooth | don't know | |
|---|---|---|
| No | 48.6 | 51.4 |
| Yes, first child | 29.2 | 70.8 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`8__In_which_age_you_should_begin_to_brush_your_childs_teeth_`)
X-squared = 60, df = 1, p-value = 1e-14
| don't know | toothbrush and toothpaste | |
|---|---|---|
| No | 74.7 | 25.3 |
| Yes, first child | 76.6 | 23.4 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`9__What_would_you_have_to_use_for_brushing_your_childs_first_teeth_`)
X-squared = 0.6, df = 1, p-value = 0.4
| don' t know | toothpaste with fluorides | |
|---|---|---|
| No | 37.5 | 62.5 |
| Yes, first child | 54.3 | 45.7 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`10__Which_toothpaste_would_you_choose_for_your_childs_first_teeth_`)
X-squared = 40, df = 1, p-value = 5e-11
| do not agree | don't know or agree | |
|---|---|---|
| No | 38.9 | 61.1 |
| Yes, first child | 33.3 | 66.7 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`12__Fluoride_toothpaste_is_bad_for_my_child`)
X-squared = 5, df = 1, p-value = 0.03
| 1000 ppm | don't know | |
|---|---|---|
| No | 0.619 | 99.4 |
| Yes, first child | 1.893 | 98.1 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`13__How_much_fluoride_should_a_0-3-year_old_childs_toothpaste_contain_`)
X-squared = 5, df = 1, p-value = 0.03
| don't know | pea size or as rice grain | |
|---|---|---|
| No | 10.3 | 89.7 |
| Yes, first child | 10.3 | 89.7 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`17__How_much_toothpastes_should_be_squeezed_out_on_a_toothbrush_`)
X-squared = 5e-30, df = 1, p-value = 1
| don't know | pēc vajadzības kad bērns atļauj tīrīt | twice daily | |
|---|---|---|---|
| No | 28.2 | 0.103 | 71.7 |
| Yes, first child | 33.1 | 0.000 | 66.9 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$`2_Is_it_your_first_child_`, df$`18_1_How_many_times_per_day_you_should_brush_your_childs_teeth_`)
X-squared = 5, df = 2, p-value = 0.09
| do not agree | don' t know or agree | |
|---|---|---|
| No | 56.2 | 43.8 |
| Yes, first child | 65.4 | 34.6 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`19__Toothbrushing_against_a_childs’_will_is_aggression_towards_a_child_`)
X-squared = 10, df = 1, p-value = 3e-04
| do not agree | don' t know or agree | |
|---|---|---|
| No | 88.3 | 11.7 |
| Yes, first child | 91.5 | 8.5 |
Pearson's Chi-squared test with Yates' continuity correction
data: table(df$`2_Is_it_your_first_child_`, df$`20__It_is_better_to_not_to_brush_against_childs_will_as_the_milk_teeth_will_fall_out_anyway_`)
X-squared = 4, df = 1, p-value = 0.05
| important | not important | |
|---|---|---|
| 300-700 EUR | 89.7 | 10.32 |
| < 300 EUR | 77.6 | 22.38 |
| > 700 EUR | 95.9 | 4.15 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`6__Is_it_important_to_take_care_about_deciduous_teeth_`)
X-squared = 50, df = 2, p-value = 2e-12
| Juice or other drinks with sugar | Just water or herbal tea without sugar | |
|---|---|---|
| 300-700 EUR | 13.37 | 86.6 |
| < 300 EUR | 20.28 | 79.7 |
| > 700 EUR | 6.14 | 93.9 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`7__Before_going_to_sleep,_what_could_you_offer_for_your_2-year_old_child_`)
X-squared = 30, df = 2, p-value = 6e-08
| after eruption of the first milk tooth | don't know | |
|---|---|---|
| 300-700 EUR | 37.1 | 62.9 |
| < 300 EUR | 23.6 | 76.4 |
| > 700 EUR | 48.3 | 51.7 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`8__In_which_age_you_should_begin_to_brush_your_childs_teeth_`)
X-squared = 40, df = 2, p-value = 8e-09
| don't know | toothbrush and toothpaste | |
|---|---|---|
| 300-700 EUR | 76.0 | 24.0 |
| < 300 EUR | 73.4 | 26.6 |
| > 700 EUR | 74.4 | 25.6 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`9__What_would_you_have_to_use_for_brushing_your_childs_first_teeth_`)
X-squared = 0.7, df = 2, p-value = 0.7
| don' t know | toothpaste with fluorides | |
|---|---|---|
| 300-700 EUR | 44.2 | 55.8 |
| < 300 EUR | 49.6 | 50.4 |
| > 700 EUR | 41.4 | 58.6 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`10__Which_toothpaste_would_you_choose_for_your_childs_first_teeth_`)
X-squared = 4, df = 2, p-value = 0.2
| do not agree | don't know or agree | |
|---|---|---|
| 300-700 EUR | 34.3 | 65.7 |
| < 300 EUR | 20.4 | 79.6 |
| > 700 EUR | 43.0 | 57.0 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`12__Fluoride_toothpaste_is_bad_for_my_child`)
X-squared = 30, df = 2, p-value = 4e-07
| 1000 ppm | don't know | |
|---|---|---|
| 300-700 EUR | 1.01 | 99.0 |
| < 300 EUR | 0.00 | 100.0 |
| > 700 EUR | 1.21 | 98.8 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`13__How_much_fluoride_should_a_0-3-year_old_childs_toothpaste_contain_`)
X-squared = 2, df = 2, p-value = 0.4
| don't know | pea size or as rice grain | |
|---|---|---|
| 300-700 EUR | 10.8 | 89.2 |
| < 300 EUR | 20.1 | 79.9 |
| > 700 EUR | 7.7 | 92.3 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`17__How_much_toothpastes_should_be_squeezed_out_on_a_toothbrush_`)
X-squared = 20, df = 2, p-value = 5e-05
| don't know | pēc vajadzības kad bērns atļauj tīrīt | twice daily | |
|---|---|---|---|
| 300-700 EUR | 32.2 | 0.145 | 67.6 |
| < 300 EUR | 39.0 | 0.000 | 61.0 |
| > 700 EUR | 25.7 | 0.000 | 74.3 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`18_1_How_many_times_per_day_you_should_brush_your_childs_teeth_`)
X-squared = 10, df = 4, p-value = 0.007
| do not agree | don' t know or agree | |
|---|---|---|
| 300-700 EUR | 56.0 | 44.0 |
| < 300 EUR | 46.8 | 53.2 |
| > 700 EUR | 65.7 | 34.3 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`19__Toothbrushing_against_a_childs’_will_is_aggression_towards_a_child_`)
X-squared = 20, df = 2, p-value = 7e-06
| do not agree | don' t know or agree | |
|---|---|---|
| 300-700 EUR | 88.5 | 11.47 |
| < 300 EUR | 76.2 | 23.78 |
| > 700 EUR | 92.6 | 7.39 |
Pearson's Chi-squared test
data: table(df$`29__Income_for_family`, df$`20__It_is_better_to_not_to_brush_against_childs_will_as_the_milk_teeth_will_fall_out_anyway_`)
X-squared = 30, df = 2, p-value = 5e-08
| important | not important | |
|---|---|---|
| basic education | 79.6 | 20.36 |
| college | 90.0 | 10.03 |
| high school | 88.9 | 11.11 |
| university | 95.2 | 4.85 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`6__Is_it_important_to_take_care_about_deciduous_teeth_`)
X-squared = 50, df = 3, p-value = 6e-10
| Juice or other drinks with sugar | Just water or herbal tea without sugar | |
|---|---|---|
| basic education | 23.08 | 76.9 |
| college | 9.40 | 90.6 |
| high school | 15.18 | 84.8 |
| university | 6.73 | 93.3 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`7__Before_going_to_sleep,_what_could_you_offer_for_your_2-year_old_child_`)
X-squared = 50, df = 3, p-value = 4e-10
| after eruption of the first milk tooth | don't know | |
|---|---|---|
| basic education | 27.1 | 72.9 |
| college | 36.8 | 63.2 |
| high school | 32.4 | 67.6 |
| university | 49.2 | 50.8 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`8__In_which_age_you_should_begin_to_brush_your_childs_teeth_`)
X-squared = 50, df = 3, p-value = 5e-10
| don't know | toothbrush and toothpaste | |
|---|---|---|
| basic education | 69.2 | 30.8 |
| college | 73.8 | 26.2 |
| high school | 80.7 | 19.3 |
| university | 75.8 | 24.2 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`9__What_would_you_have_to_use_for_brushing_your_childs_first_teeth_`)
X-squared = 9, df = 3, p-value = 0.04
| don' t know | toothpaste with fluorides | |
|---|---|---|
| basic education | 49.7 | 50.3 |
| college | 41.8 | 58.2 |
| high school | 45.2 | 54.8 |
| university | 43.1 | 56.9 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`10__Which_toothpaste_would_you_choose_for_your_childs_first_teeth_`)
X-squared = 3, df = 3, p-value = 0.4
| do not agree | don't know or agree | |
|---|---|---|
| basic education | 18.3 | 81.7 |
| college | 32.7 | 67.3 |
| high school | 27.6 | 72.4 |
| university | 46.1 | 53.9 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`12__Fluoride_toothpaste_is_bad_for_my_child`)
X-squared = 70, df = 3, p-value = 3e-14
| 1000 ppm | don't know | |
|---|---|---|
| basic education | 0.617 | 99.4 |
| college | 0.345 | 99.7 |
| high school | 1.325 | 98.7 |
| university | 1.299 | 98.7 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`13__How_much_fluoride_should_a_0-3-year_old_childs_toothpaste_contain_`)
X-squared = 2, df = 3, p-value = 0.5
| don't know | pea size or as rice grain | |
|---|---|---|
| basic education | 17.28 | 82.7 |
| college | 12.08 | 87.9 |
| high school | 12.17 | 87.8 |
| university | 7.16 | 92.8 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`17__How_much_toothpastes_should_be_squeezed_out_on_a_toothbrush_`)
X-squared = 20, df = 3, p-value = 2e-04
| don't know | pēc vajadzības kad bērns atļauj tīrīt | twice daily | |
|---|---|---|---|
| basic education | 39.2 | 0.00 | 60.8 |
| college | 30.7 | 0.00 | 69.3 |
| high school | 29.3 | 0.00 | 70.7 |
| university | 27.7 | 0.13 | 72.2 |
Chi-squared approximation may be incorrect
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`18_1_How_many_times_per_day_you_should_brush_your_childs_teeth_`)
X-squared = 10, df = 6, p-value = 0.1
| do not agree | don' t know or agree | |
|---|---|---|
| basic education | 48.2 | 51.8 |
| college | 58.8 | 41.2 |
| high school | 50.2 | 49.8 |
| university | 66.2 | 33.8 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`19__Toothbrushing_against_a_childs’_will_is_aggression_towards_a_child_`)
X-squared = 30, df = 3, p-value = 2e-07
| do not agree | don' t know or agree | |
|---|---|---|
| basic education | 79.6 | 20.36 |
| college | 91.7 | 8.33 |
| high school | 87.6 | 12.38 |
| university | 91.0 | 8.96 |
Pearson's Chi-squared test
data: table(df$`31__Mothers_education_group`, df$`20__It_is_better_to_not_to_brush_against_childs_will_as_the_milk_teeth_will_fall_out_anyway_`)
X-squared = 20, df = 3, p-value = 9e-05
df %>%
ggplot(aes(fct_infreq(Pildita))) +
geom_bar() +
coord_flip() +
ggtitle("Participants") + ylab("Count") + xlab("Pildeta")
NA
df %>%
ggplot(aes(fct_infreq(Lives_in))) +
geom_bar() +
coord_flip() +
ggtitle("Participants") + ylab("Count") + xlab("Lives_in")
df %>%
ggplot(aes(`2_Is_it_your_first_child_`)) +
geom_bar()
df %>%
ggplot(aes(`3__Nr__of_children_in_family`)) +
geom_bar()
df %>%
ggplot(aes(`4__Oral_health_for_older_siblings_groups`)) +
geom_bar()
df$income <- factor(df$`29__Income_for_family`, c("< 300 EUR",
"300-700 EUR",
"> 700 EUR"))
df %>%
ggplot(aes(income)) +
geom_bar()
df %>%
ggplot(aes(x = `23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_`)) +
geom_bar()
df$education <- factor(df$`31__Mothers_education_group`,
c("basic education",
"high school",
"college",
"university"))
df %>%
ggplot(aes(x = education)) +
geom_bar()
df %>%
ggplot(aes(x = AttPerc, y = KnoPerc, colour = education)) +
geom_point()
df %>%
ggplot(aes(x = education, y = AttPerc)) +
geom_boxplot()
df %>%
ggplot(aes(x = Lives_in, y = Attitude)) +
geom_boxplot()
df %>%
ggplot(aes(x = Lives_in, y = KnoPerc)) +
geom_boxplot()
fit_att <- glm(AttPerc ~
Age_groups +
Lives_in +
`2_Is_it_your_first_child_` +
`21_Do_you_have_your_own_dentist_` +
`23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_` +
`24__Have_you_had_your_teeth_restored_in_latest_` +
`26__Do_you_use_fluoride_toothpaste_` +
`27__Did_you_smoke_until_pregnancy_` +
`29__Income_for_family` +
`31__Mothers_education_group` +
`32_Do_you_use_phone_with_internet_`,
data = df)
summary(fit_att)
Call:
glm(formula = AttPerc ~ Age_groups + Lives_in + `2_Is_it_your_first_child_` +
`21_Do_you_have_your_own_dentist_` + `23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_` +
`24__Have_you_had_your_teeth_restored_in_latest_` + `26__Do_you_use_fluoride_toothpaste_` +
`27__Did_you_smoke_until_pregnancy_` + `29__Income_for_family` +
`31__Mothers_education_group` + `32_Do_you_use_phone_with_internet_`,
data = df)
Deviance Residuals:
Min 1Q Median 3Q Max
-72.74 -16.07 2.44 17.76 52.52
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 57.011 2.841 20.07 < 2e-16
Age_groups> 30 gadi 0.147 1.399 0.11 0.91613
Lives_inPilsēta -0.979 1.427 -0.69 0.49291
Lives_inRīga vai Rīgas rajons 3.356 1.827 1.84 0.06643
`2_Is_it_your_first_child_`Yes, first child 0.202 1.351 0.15 0.88093
`21_Do_you_have_your_own_dentist_`Yes 1.893 1.560 1.21 0.22500
`23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_`Yes 0.246 1.295 0.19 0.84922
`24__Have_you_had_your_teeth_restored_in_latest_`Yes 0.326 1.288 0.25 0.80036
`26__Do_you_use_fluoride_toothpaste_`Yes 4.413 1.253 3.52 0.00045
`27__Did_you_smoke_until_pregnancy_`Yes -0.779 1.528 -0.51 0.61044
`29__Income_for_family`< 300 EUR -8.752 2.345 -3.73 0.00020
`29__Income_for_family`> 700 EUR 4.122 1.365 3.02 0.00258
`31__Mothers_education_group`college 5.649 2.477 2.28 0.02276
`31__Mothers_education_group`high school 3.020 2.406 1.25 0.20971
`31__Mothers_education_group`university 9.558 2.384 4.01 6.4e-05
`32_Do_you_use_phone_with_internet_`Yes 0.320 1.590 0.20 0.84077
(Intercept) ***
Age_groups> 30 gadi
Lives_inPilsēta
Lives_inRīga vai Rīgas rajons .
`2_Is_it_your_first_child_`Yes, first child
`21_Do_you_have_your_own_dentist_`Yes
`23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_`Yes
`24__Have_you_had_your_teeth_restored_in_latest_`Yes
`26__Do_you_use_fluoride_toothpaste_`Yes ***
`27__Did_you_smoke_until_pregnancy_`Yes
`29__Income_for_family`< 300 EUR ***
`29__Income_for_family`> 700 EUR **
`31__Mothers_education_group`college *
`31__Mothers_education_group`high school
`31__Mothers_education_group`university ***
`32_Do_you_use_phone_with_internet_`Yes
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 505)
Null deviance: 738354 on 1334 degrees of freedom
Residual deviance: 666552 on 1319 degrees of freedom
(325 observations deleted due to missingness)
AIC: 12117
Number of Fisher Scoring iterations: 2
td_att <- tidy(fit_att, conf.int = TRUE)
td_att %>%
ggplot(aes(term, estimate)) +
geom_point() +
geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
labs(title = "Coefficients of a linear regression model")
fit_know <- glm(KnoPerc ~
Age_groups +
Lives_in +
`2_Is_it_your_first_child_` +
`21_Do_you_have_your_own_dentist_` +
`23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_` +
`24__Have_you_had_your_teeth_restored_in_latest_` +
`26__Do_you_use_fluoride_toothpaste_` +
`27__Did_you_smoke_until_pregnancy_` +
`29__Income_for_family` +
`31__Mothers_education_group` +
`32_Do_you_use_phone_with_internet_`,
data = df)
summary(fit_know)
Call:
glm(formula = KnoPerc ~ Age_groups + Lives_in + `2_Is_it_your_first_child_` +
`21_Do_you_have_your_own_dentist_` + `23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_` +
`24__Have_you_had_your_teeth_restored_in_latest_` + `26__Do_you_use_fluoride_toothpaste_` +
`27__Did_you_smoke_until_pregnancy_` + `29__Income_for_family` +
`31__Mothers_education_group` + `32_Do_you_use_phone_with_internet_`,
data = df)
Deviance Residuals:
Min 1Q Median 3Q Max
-48.0 -10.2 -0.1 10.4 42.4
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 41.418 1.902 21.78 < 2e-16
Age_groups> 30 gadi -0.457 0.937 -0.49 0.62590
Lives_inPilsēta 1.906 0.956 1.99 0.04628
Lives_inRīga vai Rīgas rajons 2.659 1.223 2.17 0.02988
`2_Is_it_your_first_child_`Yes, first child -5.201 0.905 -5.75 1.1e-08
`21_Do_you_have_your_own_dentist_`Yes 0.332 1.044 0.32 0.75028
`23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_`Yes 0.924 0.867 1.07 0.28650
`24__Have_you_had_your_teeth_restored_in_latest_`Yes 1.053 0.863 1.22 0.22228
`26__Do_you_use_fluoride_toothpaste_`Yes 3.438 0.839 4.10 4.5e-05
`27__Did_you_smoke_until_pregnancy_`Yes -0.657 1.023 -0.64 0.52102
`29__Income_for_family`< 300 EUR -3.647 1.570 -2.32 0.02035
`29__Income_for_family`> 700 EUR 2.324 0.914 2.54 0.01112
`31__Mothers_education_group`college 3.795 1.659 2.29 0.02232
`31__Mothers_education_group`high school 2.483 1.611 1.54 0.12355
`31__Mothers_education_group`university 5.697 1.596 3.57 0.00037
`32_Do_you_use_phone_with_internet_`Yes 0.440 1.065 0.41 0.67961
(Intercept) ***
Age_groups> 30 gadi
Lives_inPilsēta *
Lives_inRīga vai Rīgas rajons *
`2_Is_it_your_first_child_`Yes, first child ***
`21_Do_you_have_your_own_dentist_`Yes
`23__Did_you_receive_recommendation_from_your_ginecologist_to_visit_a_dentist_during_pregnancy_`Yes
`24__Have_you_had_your_teeth_restored_in_latest_`Yes
`26__Do_you_use_fluoride_toothpaste_`Yes ***
`27__Did_you_smoke_until_pregnancy_`Yes
`29__Income_for_family`< 300 EUR *
`29__Income_for_family`> 700 EUR *
`31__Mothers_education_group`college *
`31__Mothers_education_group`high school
`31__Mothers_education_group`university ***
`32_Do_you_use_phone_with_internet_`Yes
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 227)
Null deviance: 330635 on 1334 degrees of freedom
Residual deviance: 298863 on 1319 degrees of freedom
(325 observations deleted due to missingness)
AIC: 11046
Number of Fisher Scoring iterations: 2
td_know <- tidy(fit_know, conf.int = TRUE)
td_know %>%
ggplot(aes(term, estimate)) +
geom_point() +
coord_flip() +
geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
labs(title = "Coefficients of a linear regression model")
summary(df_BMI$BMI)
Min. 1st Qu. Median Mean 3rd Qu. Max.
15.4 20.6 22.6 23.4 25.4 44.2