Authors are from: Sydney School of Veterinary Science, The University of Sydney, Camden, New South Wales 2570, Australia ”
Import data, run library
library(readxl)
library(tidyverse)
library(lme4)
library(broom.mixed)
library(performance)
library(see)
library(patchwork)
library(knitr)
library(janitor)
data <- read_excel("data_fluid_app.xlsx")
data2 <- read_excel("data_fluid_app.xlsx",
sheet = "import2")
quant <- read_excel("data_fluid_app.xlsx",
sheet = "other data", col_types = c("text",
"text", "text", "text", "text", "text",
"text", "text", "text", "text", "text",
"text", "text", "text", "text", "skip",
"skip", "skip", "skip"))
data <- data %>% arrange(id)
data2 <- data2 %>% arrange(id)
quant <- quant %>% arrange(id)
Check data for incomplete surveys
#id "R_1IfKGBEdaAjQZ7K" did not fill in some sections. Will delete
data <- data %>% filter(id != "R_1IfKGBEdaAjQZ7K")
data2 <- data2 %>% filter(id != "R_1IfKGBEdaAjQZ7K")
quant <- quant %>% filter(id != "R_1IfKGBEdaAjQZ7K")
quant <- quant %>% select(-apps_used,-preference,-attitude,-feedback)
quant$age <- quant$age %>% as.numeric()
Data without .xlsx files can input data using the code below
data <- structure(list(id = c("FS_1F4ndmfv4FRhMl7", "FS_1F4ndmfv4FRhMl7",
"FS_2aQanMGUwpJZDYl", "FS_2aQanMGUwpJZDYl", "R_06gon5h75y2OtZD",
"R_06gon5h75y2OtZD", "R_10YNVdHuP1M7BLY", "R_10YNVdHuP1M7BLY",
"R_1E585h59C3GfybR", "R_1E585h59C3GfybR", "R_1FlfqH1Mt6W4OV4",
"R_1FlfqH1Mt6W4OV4", "R_1GDeDAdiJnVB0s2", "R_1GDeDAdiJnVB0s2",
"R_1hG9g6mIxGn8ZWj", "R_1hG9g6mIxGn8ZWj", "R_1IKw2OhleiYRL4q",
"R_1IKw2OhleiYRL4q", "R_1IMcAojZOzeJuvF", "R_1IMcAojZOzeJuvF",
"R_1IMYbcaCx7KeA38", "R_1IMYbcaCx7KeA38", "R_1kXIx2HhCumDkmq",
"R_1kXIx2HhCumDkmq", "R_1l04SIKet4JM5oK", "R_1l04SIKet4JM5oK",
"R_1LLqU4C3umOUznu", "R_1LLqU4C3umOUznu", "R_1llydHpgYrmJIMS",
"R_1llydHpgYrmJIMS", "R_1mVMgqxtCtSwBXO", "R_1mVMgqxtCtSwBXO",
"R_1P8gxZvb4H0Shv9", "R_1P8gxZvb4H0Shv9", "R_1qaiQQyr8bu2Dnh",
"R_1qaiQQyr8bu2Dnh", "R_1Qz719yHd5BQBFv", "R_1Qz719yHd5BQBFv",
"R_22RcWofEoI56dsf", "R_22RcWofEoI56dsf", "R_29azxBaN1eR6tn9",
"R_29azxBaN1eR6tn9", "R_29c9bWPlbniXPhg", "R_29c9bWPlbniXPhg",
"R_2ClhxDDaB38uJd2", "R_2ClhxDDaB38uJd2", "R_2coWnUVOwj7YBN4",
"R_2coWnUVOwj7YBN4", "R_2dQ26mYjJVtDDmw", "R_2dQ26mYjJVtDDmw",
"R_2EHnrhzveVCptoc", "R_2EHnrhzveVCptoc", "R_2eXNk9BXMzAp5g2",
"R_2eXNk9BXMzAp5g2", "R_2f7C3tT9Jk2UJEP", "R_2f7C3tT9Jk2UJEP",
"R_2qsM6jMLPpUDkUF", "R_2qsM6jMLPpUDkUF", "R_2rHO6Flyml9FP5p",
"R_2rHO6Flyml9FP5p", "R_2yjWe8cVqJm89zO", "R_2yjWe8cVqJm89zO",
"R_30ipYcmaXJLh732", "R_30ipYcmaXJLh732", "R_31mUdlu6JrQ0uw8",
"R_31mUdlu6JrQ0uw8", "R_3CMVIvsrKobFDCA", "R_3CMVIvsrKobFDCA",
"R_3dRGOnsGmQcGnLh", "R_3dRGOnsGmQcGnLh", "R_3g2czbQSlDvx8JP",
"R_3g2czbQSlDvx8JP", "R_3illfbJFkdNqkGM", "R_3illfbJFkdNqkGM",
"R_3kKVLswnnIpQiFE", "R_3kKVLswnnIpQiFE", "R_3LhEYMu6J9UMzja",
"R_3LhEYMu6J9UMzja", "R_3TWNY0AZLcA7S7v", "R_3TWNY0AZLcA7S7v",
"R_6PfXWjedMivcSZ3", "R_6PfXWjedMivcSZ3", "R_8oVjn5iCjrNPjlT",
"R_8oVjn5iCjrNPjlT", "R_9XZ9sme0CvR8wKt", "R_9XZ9sme0CvR8wKt",
"R_AGSkDnfSNkFxg7T", "R_AGSkDnfSNkFxg7T", "R_bI3SnTlrBKH6Xx7",
"R_bI3SnTlrBKH6Xx7", "R_bm7GkgUVCQpM9Mt", "R_bm7GkgUVCQpM9Mt",
"R_bx6Yr5nMbIfTTtn", "R_bx6Yr5nMbIfTTtn", "R_C9duWufyN6qomIh",
"R_C9duWufyN6qomIh", "R_DwQX8mRiBs84YGR", "R_DwQX8mRiBs84YGR",
"R_pu7nnDIsRnwFhp7", "R_pu7nnDIsRnwFhp7", "R_RrkyKiRuWP7rTIR",
"R_RrkyKiRuWP7rTIR", "R_SAUEuXWSTQWNFeh", "R_SAUEuXWSTQWNFeh",
"R_WwiQDYmMooTAA2l", "R_WwiQDYmMooTAA2l", "R_Z2BJEtTVJ4rVOqR",
"R_Z2BJEtTVJ4rVOqR", "R_ZwY8Rfs5r6csG9X", "R_ZwY8Rfs5r6csG9X"
), group = c("control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app"), case = c("3w",
"5d", "5d", "3w", "3w", "5d", "3w", "5d", "5d", "3w", "3w", "5d",
"5d", "3w", "3w", "5d", "5d", "3w", "3w", "5d", "3w", "5d", "5d",
"3w", "3w", "5d", "3w", "5d", "3w", "5d", "5d", "3w", "5d", "3w",
"3w", "5d", "3w", "5d", "5d", "3w", "5d", "3w", "3w", "5d", "3w",
"5d", "5d", "3w", "5d", "3w", "5d", "3w", "3w", "5d", "3w", "5d",
"3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d", "5d",
"3w", "3w", "5d", "5d", "3w", "5d", "3w", "3w", "5d", "5d", "3w",
"5d", "3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d",
"3w", "3w", "5d", "5d", "3w", "3w", "5d", "3w", "5d", "3w", "5d",
"5d", "3w", "3w", "5d", "3w", "5d", "5d", "3w", "3w", "5d"),
deficit = c(0, 1, 1, 2, 1, 2, 2, 2, 0, 2, 1, 2, 0, 2, 2,
2, 2, 2, 0, 2, 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2,
1, 2, 0, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 0, 2, 2, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 0, 2, 2, 1,
2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 0, 2, 2, 0,
0, 2, 1, 0, 1, 2, 2, 0, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2),
losses = c(1, 1, 0, 1, 2, 0, 2, 2, 0, 2, 2, 2, 1, 2, 1, 2,
1, 1, 2, 2, 0, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2,
2, 2, 2, 1, 2, 1, 2, 1, 2, 0, 1, 1, 2, 1, 2, 1, 2, 0, 2,
2, 2, 1, 2, 0, 1, 2, 2, 2, 2, 0, 2, 2, 2, 1, 0, 0, 0, 0,
0, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 0, 1,
0, 0, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2), mainten = c(0,
2, 1, 0, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2,
2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 1, 2, 2,
2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1,
2, 2, 0, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2), base = c(0, 2,
2, 0, 2, 2, 1, 2, 2, 2, 2, 2, 0, 2, 1, 2, 1, 2, 1, 2, 0,
0, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
1, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1,
2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 0, 2, 2, 1, 2, 1, 2, 2,
1, 2, 2, 2, 0, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2,
2, 0, 2, 0, 2, 2, 2, 2, 2, 1, 1, 1, 2)), class = c("tbl_df",
"tbl", "data.frame"), row.names = c(NA, -110L))
data2 <- structure(list(id = c("FS_1F4ndmfv4FRhMl7", "FS_1F4ndmfv4FRhMl7",
"FS_2aQanMGUwpJZDYl", "FS_2aQanMGUwpJZDYl", "R_06gon5h75y2OtZD",
"R_06gon5h75y2OtZD", "R_10YNVdHuP1M7BLY", "R_10YNVdHuP1M7BLY",
"R_1E585h59C3GfybR", "R_1E585h59C3GfybR", "R_1FlfqH1Mt6W4OV4",
"R_1FlfqH1Mt6W4OV4", "R_1GDeDAdiJnVB0s2", "R_1GDeDAdiJnVB0s2",
"R_1hG9g6mIxGn8ZWj", "R_1hG9g6mIxGn8ZWj", "R_1IKw2OhleiYRL4q",
"R_1IKw2OhleiYRL4q", "R_1IMcAojZOzeJuvF", "R_1IMcAojZOzeJuvF",
"R_1IMYbcaCx7KeA38", "R_1IMYbcaCx7KeA38", "R_1kXIx2HhCumDkmq",
"R_1kXIx2HhCumDkmq", "R_1l04SIKet4JM5oK", "R_1l04SIKet4JM5oK",
"R_1LLqU4C3umOUznu", "R_1LLqU4C3umOUznu", "R_1llydHpgYrmJIMS",
"R_1llydHpgYrmJIMS", "R_1mVMgqxtCtSwBXO", "R_1mVMgqxtCtSwBXO",
"R_1P8gxZvb4H0Shv9", "R_1P8gxZvb4H0Shv9", "R_1qaiQQyr8bu2Dnh",
"R_1qaiQQyr8bu2Dnh", "R_1Qz719yHd5BQBFv", "R_1Qz719yHd5BQBFv",
"R_22RcWofEoI56dsf", "R_22RcWofEoI56dsf", "R_29azxBaN1eR6tn9",
"R_29azxBaN1eR6tn9", "R_29c9bWPlbniXPhg", "R_29c9bWPlbniXPhg",
"R_2ClhxDDaB38uJd2", "R_2ClhxDDaB38uJd2", "R_2coWnUVOwj7YBN4",
"R_2coWnUVOwj7YBN4", "R_2dQ26mYjJVtDDmw", "R_2dQ26mYjJVtDDmw",
"R_2EHnrhzveVCptoc", "R_2EHnrhzveVCptoc", "R_2eXNk9BXMzAp5g2",
"R_2eXNk9BXMzAp5g2", "R_2f7C3tT9Jk2UJEP", "R_2f7C3tT9Jk2UJEP",
"R_2qsM6jMLPpUDkUF", "R_2qsM6jMLPpUDkUF", "R_2rHO6Flyml9FP5p",
"R_2rHO6Flyml9FP5p", "R_2yjWe8cVqJm89zO", "R_2yjWe8cVqJm89zO",
"R_30ipYcmaXJLh732", "R_30ipYcmaXJLh732", "R_31mUdlu6JrQ0uw8",
"R_31mUdlu6JrQ0uw8", "R_3CMVIvsrKobFDCA", "R_3CMVIvsrKobFDCA",
"R_3dRGOnsGmQcGnLh", "R_3dRGOnsGmQcGnLh", "R_3g2czbQSlDvx8JP",
"R_3g2czbQSlDvx8JP", "R_3illfbJFkdNqkGM", "R_3illfbJFkdNqkGM",
"R_3kKVLswnnIpQiFE", "R_3kKVLswnnIpQiFE", "R_3LhEYMu6J9UMzja",
"R_3LhEYMu6J9UMzja", "R_3TWNY0AZLcA7S7v", "R_3TWNY0AZLcA7S7v",
"R_6PfXWjedMivcSZ3", "R_6PfXWjedMivcSZ3", "R_8oVjn5iCjrNPjlT",
"R_8oVjn5iCjrNPjlT", "R_9XZ9sme0CvR8wKt", "R_9XZ9sme0CvR8wKt",
"R_AGSkDnfSNkFxg7T", "R_AGSkDnfSNkFxg7T", "R_bI3SnTlrBKH6Xx7",
"R_bI3SnTlrBKH6Xx7", "R_bm7GkgUVCQpM9Mt", "R_bm7GkgUVCQpM9Mt",
"R_bx6Yr5nMbIfTTtn", "R_bx6Yr5nMbIfTTtn", "R_C9duWufyN6qomIh",
"R_C9duWufyN6qomIh", "R_DwQX8mRiBs84YGR", "R_DwQX8mRiBs84YGR",
"R_pu7nnDIsRnwFhp7", "R_pu7nnDIsRnwFhp7", "R_RrkyKiRuWP7rTIR",
"R_RrkyKiRuWP7rTIR", "R_SAUEuXWSTQWNFeh", "R_SAUEuXWSTQWNFeh",
"R_WwiQDYmMooTAA2l", "R_WwiQDYmMooTAA2l", "R_Z2BJEtTVJ4rVOqR",
"R_Z2BJEtTVJ4rVOqR", "R_ZwY8Rfs5r6csG9X", "R_ZwY8Rfs5r6csG9X"
), group = c("control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app", "control",
"app", "control", "app", "control", "app", "control", "app",
"control", "app", "control", "app", "control", "app"), case = c("3w",
"5d", "5d", "3w", "3w", "5d", "3w", "5d", "5d", "3w", "3w", "5d",
"5d", "3w", "3w", "5d", "5d", "3w", "3w", "5d", "3w", "5d", "5d",
"3w", "3w", "5d", "3w", "5d", "3w", "5d", "5d", "3w", "5d", "3w",
"3w", "5d", "3w", "5d", "5d", "3w", "3w", "5d", "3w", "5d", "3w",
"5d", "5d", "3w", "5d", "3w", "5d", "3w", "3w", "5d", "3w", "5d",
"3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d", "5d",
"3w", "3w", "5d", "5d", "3w", "5d", "3w", "3w", "5d", "5d", "3w",
"5d", "3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d", "3w", "5d",
"3w", "3w", "5d", "5d", "3w", "3w", "5d", "3w", "5d", "3w", "5d",
"5d", "3w", "3w", "5d", "3w", "5d", "5d", "3w", "3w", "5d"),
total = c(4, 3, 2, 2, 2, 5, 4, 4, 2, 3, 3, 2, 2, 4, 4, 6,
4, 6, 3, 6, 3, 2, 3, 4, 2, 3, 4, 4, 4, 4, 4, 4, 3, 1, 4,
5, 2, 4, 4, 6, 2, 6, 2, 5, 1, 1, 3, 6, 4, 6, 1, 4, 6, 5,
5, 3, 2, 3, 2, 6, 4, 4, 4, 4, 2, 6, 5, 5, 3, 4, 2, 4, 1,
3, 4, 3, 1, 3, 4, 3, 5, 5, 1, 4, 3, 4, 4, 2, 4, 5, 4, 4,
1, 1, 5, 0, 4, 5, 1, 6, 2, 3, 4, 4, 3, 4, 4, 3, 3, 5), deficit = c(1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), volume = c(0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1,
1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,
0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0,
0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), alk = c(1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,
0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1,
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), bicarb = c(1, 0,
0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0,
0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1,
0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0,
1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1,
1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1,
1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1), rate.bicarb = c(1,
1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1,
0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1,
1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0,
1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0,
1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0,
0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1), oral = c(0, 0,
0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0,
1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1)), class = c("tbl_df",
"tbl", "data.frame"), row.names = c(NA, -110L))
quant <- structure(list(id = c("FS_1F4ndmfv4FRhMl7", "FS_2aQanMGUwpJZDYl",
"R_06gon5h75y2OtZD", "R_10YNVdHuP1M7BLY", "R_1E585h59C3GfybR",
"R_1FlfqH1Mt6W4OV4", "R_1GDeDAdiJnVB0s2", "R_1hG9g6mIxGn8ZWj",
"R_1IKw2OhleiYRL4q", "R_1IMcAojZOzeJuvF", "R_1IMYbcaCx7KeA38",
"R_1kXIx2HhCumDkmq", "R_1l04SIKet4JM5oK", "R_1LLqU4C3umOUznu",
"R_1llydHpgYrmJIMS", "R_1mVMgqxtCtSwBXO", "R_1P8gxZvb4H0Shv9",
"R_1qaiQQyr8bu2Dnh", "R_1Qz719yHd5BQBFv", "R_22RcWofEoI56dsf",
"R_29azxBaN1eR6tn9", "R_29c9bWPlbniXPhg", "R_2ClhxDDaB38uJd2",
"R_2coWnUVOwj7YBN4", "R_2dQ26mYjJVtDDmw", "R_2EHnrhzveVCptoc",
"R_2eXNk9BXMzAp5g2", "R_2f7C3tT9Jk2UJEP", "R_2qsM6jMLPpUDkUF",
"R_2rHO6Flyml9FP5p", "R_2yjWe8cVqJm89zO", "R_30ipYcmaXJLh732",
"R_31mUdlu6JrQ0uw8", "R_3CMVIvsrKobFDCA", "R_3dRGOnsGmQcGnLh",
"R_3g2czbQSlDvx8JP", "R_3illfbJFkdNqkGM", "R_3kKVLswnnIpQiFE",
"R_3LhEYMu6J9UMzja", "R_3TWNY0AZLcA7S7v", "R_6PfXWjedMivcSZ3",
"R_8oVjn5iCjrNPjlT", "R_9XZ9sme0CvR8wKt", "R_AGSkDnfSNkFxg7T",
"R_bI3SnTlrBKH6Xx7", "R_bm7GkgUVCQpM9Mt", "R_bx6Yr5nMbIfTTtn",
"R_C9duWufyN6qomIh", "R_DwQX8mRiBs84YGR", "R_pu7nnDIsRnwFhp7",
"R_RrkyKiRuWP7rTIR", "R_SAUEuXWSTQWNFeh", "R_WwiQDYmMooTAA2l",
"R_Z2BJEtTVJ4rVOqR", "R_ZwY8Rfs5r6csG9X"), age = c(25, 25, 29,
38, 27, 25, 26, 24, 27, 25, 24, 29, 24, 29, 25, 27, 22, 25, NA,
27, 23, 31, 25, 24, 23, 27, 24, 36, 28, 27, 26, NA, 26, 24, 32,
31, 24, 22, 23, 28, 23, 28, 29, 24, 29, 23, 30, 28, 23, 23, 25,
28, 41, 28, 25), sex = c("Female", "Male", "Female", "Male",
"Female", "Female", "Female", "Female", "Female", "Female", "Female",
"Female", "Female", "Female", "Female", "Male", "Female", "Male",
"Male", "Female", "Female", "Female", "Male", "Female", "Female",
"Female", "Male", "Female", "Female", "Female", "Male", "Female",
"Female", "Male", "Male", "Female", "Male", "Male", "Female",
"Female", "Female", "Female", "Male", "Male", "Male", "Female",
"Male", "Male", "Female", "Female", "Female", "Female", "Female",
"Female", "Male"), dvm_year = c("4th year", "4th year", "3rd year",
"3rd year", "3rd year", "3rd year", "3rd year", "4th year", "4th year",
"4th year", "4th year", "4th year", "4th year", "3rd year", "3rd year",
"4th year", "3rd year", "3rd year", "4th year", "4th year", "4th year",
"3rd year", "4th year", "4th year", "4th year", "4th year", "4th year",
"3rd year", "4th year", "4th year", "4th year", "4th year", "3rd year",
"4th year", "3rd year", "3rd year", "4th year", "4th year", "4th year",
"3rd year", "4th year", "3rd year", "4th year", "4th year", "3rd year",
"4th year", "3rd year", "3rd year", "4th year", "3rd year", "3rd year",
"4th year", "4th year", "4th year", "4th year"), `using_apps?` = c("Yes",
"Yes", "Yes", "No", "Yes", "No", "No", "Yes", "Yes", "Yes", "Yes",
"Yes", "No", "Yes", "No", "Yes", "Yes", "No", "No", "No", "Yes",
"No", "Yes", "Yes", "No", "Yes", "No", "Yes", "Yes", "Yes", "Yes",
"No", "No", "No", "Yes", "Yes", "No", "Yes", "Yes", "Yes", "Yes",
"No", "No", "Yes", "Yes", "Yes", "No", "No", "Yes", "No", "No",
"Yes", "Yes", "No", "Yes"), manual_confidence = c("Low", "Low",
"Low", "Moderate", "Low", "Very low", "Moderate", NA, "Moderate",
"Moderate", "Low", "Low", "Moderate", "High", "Very low", "Low",
"Low", "Low", "Moderate", "Moderate", "Low", "Low", "Moderate",
"Low", "Very low", "Low", "Low", "Low", "Very low", NA, "Moderate",
"Very low", "Moderate", "Moderate", "Moderate", "Low", "Moderate",
"Moderate", "Moderate", "Moderate", "Low", "Low", "Moderate",
"Moderate", "Moderate", "Moderate", "Very low", "Moderate", "Moderate",
"Low", "Moderate", "Low", "High", "Low", "Moderate"), `will_experience_help?` = c("Definitely yes",
"Probably yes", "Definitely yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Definitely yes", NA, "Definitely yes", "Definitely yes",
"Definitely yes", "Probably yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Probably yes", "Definitely yes", "Probably yes",
"Definitely yes", "Probably yes", "Definitely yes", "Definitely yes",
"Probably yes", "Definitely yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Definitely yes", "Definitely yes", NA, "Probably yes",
"Probably yes", "Definitely yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Definitely yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Probably yes", "Probably yes", "Probably yes",
"Definitely yes", "Definitely yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Definitely yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Definitely yes", "Definitely yes", "Definitely yes"
), preference_simplified = c("No Answer", "No Answer", "app",
"app", "app", "combination", "app", "app", "app", "app", "manual",
"app", "app", "combination", "app", "app", "combination", "app",
"app", "app", "app", "app", "app", "app", "app", "app", "app",
"app", "app", "app", "app", "combination", "app", "No Answer",
"app", "app", "manual", "app", "app", "app", "app", "app", "app",
"app", "app", "app", "app", "combination", "app", "combination",
"app", "app", "app", "app", "app"), user_friendly = c("No Answer",
"No Answer", "Easy to use", "Neutral", "Easy to use", "Easy to use",
"Very easy to use", "Easy to use", "Easy to use", "Easy to use",
"Neutral", "Very easy to use", "Easy to use", "Very easy to use",
"Easy to use", "Very easy to use", "Neutral", "Very easy to use",
"Easy to use", "Easy to use", "Very easy to use", "Easy to use",
"Easy to use", "Easy to use", "Easy to use", "Very easy to use",
"Easy to use", "Easy to use", "Very easy to use", "Very easy to use",
"Very easy to use", "Easy to use", "Very easy to use", "Neutral",
"Easy to use", "Neutral", "Hard to use", "Easy to use", "Easy to use",
"Easy to use", "Very easy to use", "Very easy to use", "Easy to use",
"Easy to use", "Easy to use", "Very easy to use", "Very easy to use",
"Neutral", "Very easy to use", "Easy to use", "Very easy to use",
"Very easy to use", "Easy to use", "Very easy to use", "Easy to use"
), demo_video = c("No Answer", "No Answer", "Definitely yes",
"Might or might not", "Definitely yes", "Definitely yes", "Probably yes",
"Probably yes", "Probably yes", "Probably yes", "Probably yes",
"Might or might not", "Probably yes", "Might or might not", "Probably yes",
"Probably yes", "Probably yes", "Might or might not", "Probably yes",
"Probably yes", "Probably yes", "Probably yes", "Definitely yes",
"Definitely yes", "Definitely yes", "Definitely yes", "Definitely yes",
"Definitely yes", "Definitely yes", "Probably not", "Might or might not",
"Probably yes", "Probably yes", "Probably yes", "Definitely yes",
"Definitely yes", "Probably yes", "Probably yes", "Probably yes",
"Definitely yes", "Probably yes", "Probably yes", "Probably yes",
"Might or might not", "Definitely yes", "Probably yes", "Probably yes",
"Probably yes", "Probably yes", "Definitely yes", "Might or might not",
"Probably yes", "Might or might not", "Might or might not", "Might or might not"
), native_v_web = c("No Answer", "No Answer", "Native mobile app",
"Native mobile app", "Native mobile app", "Native mobile app",
"Native mobile app", "Native mobile app", "Native mobile app",
"Native mobile app", "Native mobile app", "Makes no difference to me",
"Native mobile app", "Native mobile app", "Makes no difference to me",
"Makes no difference to me", "Native mobile app", "Makes no difference to me",
"Makes no difference to me", "Native mobile app", "Native mobile app",
"Native mobile app", "Native mobile app", "Native mobile app",
"Makes no difference to me", "Native mobile app", "Makes no difference to me",
"Native mobile app", "Native mobile app", "Makes no difference to me",
"Makes no difference to me", "Web-based app", "Native mobile app",
"Native mobile app", "Native mobile app", "Native mobile app",
"Native mobile app", "Native mobile app", "Native mobile app",
"Makes no difference to me", "Makes no difference to me", "Native mobile app",
"Native mobile app", "Native mobile app", "Native mobile app",
"Native mobile app", "Native mobile app", "Native mobile app",
"Makes no difference to me", "Native mobile app", "Native mobile app",
"Native mobile app", "Makes no difference to me", "Native mobile app",
"Native mobile app")), row.names = c(NA, -55L), class = c("tbl_df",
"tbl", "data.frame"))
print(summarytools::dfSummary(quant,valid.col=FALSE,varnumbers=F,na.col=F, graph.magnif=0.8, style="grid"))
## Data Frame Summary
## quant
## Dimensions: 55 x 11
## Duplicates: 0
##
## +-----------------------+------------------------------+--------------------+---------------------+
## | Variable | Stats / Values | Freqs (% of Valid) | Graph |
## +=======================+==============================+====================+=====================+
## | id | 1. FS_1F4ndmfv4FRhMl7 | 1 ( 1.8%) | |
## | [character] | 2. FS_2aQanMGUwpJZDYl | 1 ( 1.8%) | |
## | | 3. R_06gon5h75y2OtZD | 1 ( 1.8%) | |
## | | 4. R_10YNVdHuP1M7BLY | 1 ( 1.8%) | |
## | | 5. R_1E585h59C3GfybR | 1 ( 1.8%) | |
## | | 6. R_1FlfqH1Mt6W4OV4 | 1 ( 1.8%) | |
## | | 7. R_1GDeDAdiJnVB0s2 | 1 ( 1.8%) | |
## | | 8. R_1hG9g6mIxGn8ZWj | 1 ( 1.8%) | |
## | | 9. R_1IKw2OhleiYRL4q | 1 ( 1.8%) | |
## | | 10. R_1IMcAojZOzeJuvF | 1 ( 1.8%) | |
## | | [ 45 others ] | 45 (81.8%) | IIIIIIIIIIIIIIII |
## +-----------------------+------------------------------+--------------------+---------------------+
## | age | Mean (sd) : 26.7 (3.8) | 14 distinct values | : |
## | [numeric] | min < med < max: | | : |
## | | 22 < 26 < 41 | | . : . : |
## | | IQR (CV) : 4 (0.1) | | : : : : |
## | | | | : : : : : . . . . |
## +-----------------------+------------------------------+--------------------+---------------------+
## | sex | 1. Female | 37 (67.3%) | IIIIIIIIIIIII |
## | [character] | 2. Male | 18 (32.7%) | IIIIII |
## +-----------------------+------------------------------+--------------------+---------------------+
## | dvm_year | 1. 3rd year | 21 (38.2%) | IIIIIII |
## | [character] | 2. 4th year | 34 (61.8%) | IIIIIIIIIIII |
## +-----------------------+------------------------------+--------------------+---------------------+
## | using_apps? | 1. No | 22 (40.0%) | IIIIIIII |
## | [character] | 2. Yes | 33 (60.0%) | IIIIIIIIIIII |
## +-----------------------+------------------------------+--------------------+---------------------+
## | manual_confidence | 1. High | 2 ( 3.8%) | |
## | [character] | 2. Low | 21 (39.6%) | IIIIIII |
## | | 3. Moderate | 24 (45.3%) | IIIIIIIII |
## | | 4. Very low | 6 (11.3%) | II |
## +-----------------------+------------------------------+--------------------+---------------------+
## | will_experience_help? | 1. Definitely yes | 42 (79.2%) | IIIIIIIIIIIIIII |
## | [character] | 2. Probably yes | 11 (20.8%) | IIII |
## +-----------------------+------------------------------+--------------------+---------------------+
## | preference_simplified | 1. app | 44 (80.0%) | IIIIIIIIIIIIIIII |
## | [character] | 2. combination | 6 (10.9%) | II |
## | | 3. manual | 2 ( 3.6%) | |
## | | 4. No Answer | 3 ( 5.5%) | I |
## +-----------------------+------------------------------+--------------------+---------------------+
## | user_friendly | 1. Easy to use | 27 (49.1%) | IIIIIIIII |
## | [character] | 2. Hard to use | 1 ( 1.8%) | |
## | | 3. Neutral | 6 (10.9%) | II |
## | | 4. No Answer | 2 ( 3.6%) | |
## | | 5. Very easy to use | 19 (34.5%) | IIIIII |
## +-----------------------+------------------------------+--------------------+---------------------+
## | demo_video | 1. Definitely yes | 15 (27.3%) | IIIII |
## | [character] | 2. Might or might not | 10 (18.2%) | III |
## | | 3. No Answer | 2 ( 3.6%) | |
## | | 4. Probably not | 1 ( 1.8%) | |
## | | 5. Probably yes | 27 (49.1%) | IIIIIIIII |
## +-----------------------+------------------------------+--------------------+---------------------+
## | native_v_web | 1. Makes no difference to me | 13 (23.6%) | IIII |
## | [character] | 2. Native mobile app | 39 (70.9%) | IIIIIIIIIIIIII |
## | | 3. No Answer | 2 ( 3.6%) | |
## | | 4. Web-based app | 1 ( 1.8%) | |
## +-----------------------+------------------------------+--------------------+---------------------+
library(table1)
table1::table1(~ age + sex + dvm_year, data=quant)
Overall (N=55) |
|
---|---|
age | |
Mean (SD) | 26.7 (3.82) |
Median [Min, Max] | 26.0 [22.0, 41.0] |
Missing | 2 (3.6%) |
sex | |
Female | 37 (67.3%) |
Male | 18 (32.7%) |
dvm_year | |
3rd year | 21 (38.2%) |
4th year | 34 (61.8%) |
data$group <- fct_relevel(data$group,"control")
data$total <- (data$deficit + data$losses + data$mainten + data$base) / 8 * 100
data %>% kable
id | group | case | deficit | losses | mainten | base | total |
---|---|---|---|---|---|---|---|
FS_1F4ndmfv4FRhMl7 | control | 3w | 0 | 1 | 0 | 0 | 12.5 |
FS_1F4ndmfv4FRhMl7 | app | 5d | 1 | 1 | 2 | 2 | 75.0 |
FS_2aQanMGUwpJZDYl | control | 5d | 1 | 0 | 1 | 2 | 50.0 |
FS_2aQanMGUwpJZDYl | app | 3w | 2 | 1 | 0 | 0 | 37.5 |
R_06gon5h75y2OtZD | control | 3w | 1 | 2 | 0 | 2 | 62.5 |
R_06gon5h75y2OtZD | app | 5d | 2 | 0 | 2 | 2 | 75.0 |
R_10YNVdHuP1M7BLY | control | 3w | 2 | 2 | 2 | 1 | 87.5 |
R_10YNVdHuP1M7BLY | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1E585h59C3GfybR | control | 5d | 0 | 0 | 2 | 2 | 50.0 |
R_1E585h59C3GfybR | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_1FlfqH1Mt6W4OV4 | control | 3w | 1 | 2 | 2 | 2 | 87.5 |
R_1FlfqH1Mt6W4OV4 | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1GDeDAdiJnVB0s2 | control | 5d | 0 | 1 | 1 | 0 | 25.0 |
R_1GDeDAdiJnVB0s2 | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_1hG9g6mIxGn8ZWj | control | 3w | 2 | 1 | 2 | 1 | 75.0 |
R_1hG9g6mIxGn8ZWj | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1IKw2OhleiYRL4q | control | 5d | 2 | 1 | 2 | 1 | 75.0 |
R_1IKw2OhleiYRL4q | app | 3w | 2 | 1 | 2 | 2 | 87.5 |
R_1IMcAojZOzeJuvF | control | 3w | 0 | 2 | 2 | 1 | 62.5 |
R_1IMcAojZOzeJuvF | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1IMYbcaCx7KeA38 | control | 3w | 0 | 0 | 2 | 0 | 25.0 |
R_1IMYbcaCx7KeA38 | app | 5d | 1 | 2 | 2 | 0 | 62.5 |
R_1kXIx2HhCumDkmq | control | 5d | 1 | 1 | 0 | 2 | 50.0 |
R_1kXIx2HhCumDkmq | app | 3w | 2 | 1 | 2 | 2 | 87.5 |
R_1l04SIKet4JM5oK | control | 3w | 1 | 2 | 2 | 2 | 87.5 |
R_1l04SIKet4JM5oK | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1LLqU4C3umOUznu | control | 3w | 2 | 2 | 2 | 1 | 87.5 |
R_1LLqU4C3umOUznu | app | 5d | 2 | 2 | 0 | 2 | 75.0 |
R_1llydHpgYrmJIMS | control | 3w | 1 | 2 | 0 | 1 | 50.0 |
R_1llydHpgYrmJIMS | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1mVMgqxtCtSwBXO | control | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1mVMgqxtCtSwBXO | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_1P8gxZvb4H0Shv9 | control | 5d | 2 | 0 | 0 | 2 | 50.0 |
R_1P8gxZvb4H0Shv9 | app | 3w | 2 | 1 | 2 | 2 | 87.5 |
R_1qaiQQyr8bu2Dnh | control | 3w | 1 | 2 | 2 | 2 | 87.5 |
R_1qaiQQyr8bu2Dnh | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_1Qz719yHd5BQBFv | control | 3w | 0 | 2 | 2 | 2 | 75.0 |
R_1Qz719yHd5BQBFv | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_22RcWofEoI56dsf | control | 5d | 1 | 1 | 2 | 1 | 62.5 |
R_22RcWofEoI56dsf | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_29azxBaN1eR6tn9 | control | 5d | 2 | 1 | 2 | 1 | 75.0 |
R_29azxBaN1eR6tn9 | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_29c9bWPlbniXPhg | control | 3w | 2 | 1 | 2 | 2 | 87.5 |
R_29c9bWPlbniXPhg | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_2ClhxDDaB38uJd2 | control | 3w | 1 | 0 | 2 | 2 | 62.5 |
R_2ClhxDDaB38uJd2 | app | 5d | 2 | 1 | 2 | 2 | 87.5 |
R_2coWnUVOwj7YBN4 | control | 5d | 2 | 1 | 2 | 2 | 87.5 |
R_2coWnUVOwj7YBN4 | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_2dQ26mYjJVtDDmw | control | 5d | 2 | 1 | 2 | 0 | 62.5 |
R_2dQ26mYjJVtDDmw | app | 3w | 0 | 2 | 2 | 2 | 75.0 |
R_2EHnrhzveVCptoc | control | 5d | 2 | 1 | 0 | 2 | 62.5 |
R_2EHnrhzveVCptoc | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_2eXNk9BXMzAp5g2 | control | 3w | 1 | 0 | 2 | 2 | 62.5 |
R_2eXNk9BXMzAp5g2 | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_2f7C3tT9Jk2UJEP | control | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_2f7C3tT9Jk2UJEP | app | 5d | 2 | 2 | 1 | 1 | 75.0 |
R_2qsM6jMLPpUDkUF | control | 3w | 2 | 1 | 2 | 1 | 75.0 |
R_2qsM6jMLPpUDkUF | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_2rHO6Flyml9FP5p | control | 3w | 2 | 0 | 2 | 1 | 62.5 |
R_2rHO6Flyml9FP5p | app | 5d | 2 | 1 | 2 | 2 | 87.5 |
R_2yjWe8cVqJm89zO | control | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_2yjWe8cVqJm89zO | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_30ipYcmaXJLh732 | control | 3w | 0 | 2 | 1 | 2 | 62.5 |
R_30ipYcmaXJLh732 | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_31mUdlu6JrQ0uw8 | control | 3w | 0 | 0 | 2 | 1 | 37.5 |
R_31mUdlu6JrQ0uw8 | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_3CMVIvsrKobFDCA | control | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_3CMVIvsrKobFDCA | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_3dRGOnsGmQcGnLh | control | 3w | 0 | 1 | 2 | 2 | 62.5 |
R_3dRGOnsGmQcGnLh | app | 5d | 2 | 0 | 2 | 1 | 62.5 |
R_3g2czbQSlDvx8JP | control | 5d | 2 | 0 | 2 | 0 | 50.0 |
R_3g2czbQSlDvx8JP | app | 3w | 1 | 0 | 2 | 2 | 62.5 |
R_3illfbJFkdNqkGM | control | 5d | 2 | 0 | 2 | 2 | 75.0 |
R_3illfbJFkdNqkGM | app | 3w | 1 | 0 | 2 | 1 | 50.0 |
R_3kKVLswnnIpQiFE | control | 3w | 1 | 2 | 2 | 2 | 87.5 |
R_3kKVLswnnIpQiFE | app | 5d | 1 | 2 | 2 | 1 | 75.0 |
R_3LhEYMu6J9UMzja | control | 5d | 2 | 0 | 0 | 2 | 50.0 |
R_3LhEYMu6J9UMzja | app | 3w | 2 | 0 | 2 | 2 | 75.0 |
R_3TWNY0AZLcA7S7v | control | 5d | 2 | 2 | 2 | 1 | 87.5 |
R_3TWNY0AZLcA7S7v | app | 3w | 1 | 2 | 2 | 2 | 87.5 |
R_6PfXWjedMivcSZ3 | control | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_6PfXWjedMivcSZ3 | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_8oVjn5iCjrNPjlT | control | 5d | 1 | 2 | 2 | 0 | 62.5 |
R_8oVjn5iCjrNPjlT | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_9XZ9sme0CvR8wKt | control | 5d | 1 | 1 | 2 | 2 | 75.0 |
R_9XZ9sme0CvR8wKt | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_AGSkDnfSNkFxg7T | control | 5d | 1 | 2 | 2 | 2 | 87.5 |
R_AGSkDnfSNkFxg7T | app | 3w | 0 | 2 | 2 | 2 | 75.0 |
R_bI3SnTlrBKH6Xx7 | control | 5d | 2 | 2 | 2 | 1 | 87.5 |
R_bI3SnTlrBKH6Xx7 | app | 3w | 2 | 2 | 2 | 1 | 87.5 |
R_bm7GkgUVCQpM9Mt | control | 3w | 0 | 0 | 2 | 2 | 50.0 |
R_bm7GkgUVCQpM9Mt | app | 5d | 0 | 1 | 2 | 2 | 62.5 |
R_bx6Yr5nMbIfTTtn | control | 5d | 2 | 0 | 2 | 1 | 62.5 |
R_bx6Yr5nMbIfTTtn | app | 3w | 1 | 0 | 2 | 2 | 62.5 |
R_C9duWufyN6qomIh | control | 3w | 0 | 2 | 0 | 2 | 50.0 |
R_C9duWufyN6qomIh | app | 5d | 1 | 2 | 1 | 1 | 62.5 |
R_DwQX8mRiBs84YGR | control | 3w | 2 | 1 | 2 | 2 | 87.5 |
R_DwQX8mRiBs84YGR | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_pu7nnDIsRnwFhp7 | control | 3w | 0 | 1 | 0 | 0 | 12.5 |
R_pu7nnDIsRnwFhp7 | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_RrkyKiRuWP7rTIR | control | 5d | 1 | 1 | 0 | 0 | 25.0 |
R_RrkyKiRuWP7rTIR | app | 3w | 2 | 2 | 2 | 2 | 100.0 |
R_SAUEuXWSTQWNFeh | control | 3w | 2 | 1 | 2 | 2 | 87.5 |
R_SAUEuXWSTQWNFeh | app | 5d | 2 | 1 | 2 | 2 | 87.5 |
R_WwiQDYmMooTAA2l | control | 3w | 1 | 2 | 2 | 2 | 87.5 |
R_WwiQDYmMooTAA2l | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
R_Z2BJEtTVJ4rVOqR | control | 5d | 1 | 2 | 0 | 1 | 50.0 |
R_Z2BJEtTVJ4rVOqR | app | 3w | 2 | 2 | 2 | 1 | 87.5 |
R_ZwY8Rfs5r6csG9X | control | 3w | 1 | 2 | 2 | 1 | 75.0 |
R_ZwY8Rfs5r6csG9X | app | 5d | 2 | 2 | 2 | 2 | 100.0 |
print(summarytools::dfSummary(data,valid.col=FALSE, graph.magnif=0.8, style="grid"))
## Data Frame Summary
## data
## Dimensions: 110 x 8
## Duplicates: 0
##
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | No | Variable | Stats / Values | Freqs (% of Valid) | Graph | Missing |
## +====+=============+=========================+=====================+==================+=========+
## | 1 | id | 1. FS_1F4ndmfv4FRhMl7 | 2 ( 1.8%) | | 0 |
## | | [character] | 2. FS_2aQanMGUwpJZDYl | 2 ( 1.8%) | | (0.0%) |
## | | | 3. R_06gon5h75y2OtZD | 2 ( 1.8%) | | |
## | | | 4. R_10YNVdHuP1M7BLY | 2 ( 1.8%) | | |
## | | | 5. R_1E585h59C3GfybR | 2 ( 1.8%) | | |
## | | | 6. R_1FlfqH1Mt6W4OV4 | 2 ( 1.8%) | | |
## | | | 7. R_1GDeDAdiJnVB0s2 | 2 ( 1.8%) | | |
## | | | 8. R_1hG9g6mIxGn8ZWj | 2 ( 1.8%) | | |
## | | | 9. R_1IKw2OhleiYRL4q | 2 ( 1.8%) | | |
## | | | 10. R_1IMcAojZOzeJuvF | 2 ( 1.8%) | | |
## | | | [ 45 others ] | 90 (81.8%) | IIIIIIIIIIIIIIII | |
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | 2 | group | 1. control | 55 (50.0%) | IIIIIIIIII | 0 |
## | | [factor] | 2. app | 55 (50.0%) | IIIIIIIIII | (0.0%) |
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | 3 | case | 1. 3w | 55 (50.0%) | IIIIIIIIII | 0 |
## | | [character] | 2. 5d | 55 (50.0%) | IIIIIIIIII | (0.0%) |
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | 4 | deficit | Mean (sd) : 1.5 (0.7) | 0 : 15 (13.6%) | II | 0 |
## | | [numeric] | min < med < max: | 1 : 26 (23.6%) | IIII | (0.0%) |
## | | | 0 < 2 < 2 | 2 : 69 (62.7%) | IIIIIIIIIIII | |
## | | | IQR (CV) : 1 (0.5) | | | |
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | 5 | losses | Mean (sd) : 1.4 (0.8) | 0 : 19 (17.3%) | III | 0 |
## | | [numeric] | min < med < max: | 1 : 27 (24.5%) | IIII | (0.0%) |
## | | | 0 < 2 < 2 | 2 : 64 (58.2%) | IIIIIIIIIII | |
## | | | IQR (CV) : 1 (0.5) | | | |
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | 6 | mainten | Mean (sd) : 1.7 (0.7) | 0 : 13 (11.8%) | II | 0 |
## | | [numeric] | min < med < max: | 1 : 5 ( 4.5%) | | (0.0%) |
## | | | 0 < 2 < 2 | 2 : 92 (83.6%) | IIIIIIIIIIIIIIII | |
## | | | IQR (CV) : 0 (0.4) | | | |
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | 7 | base | Mean (sd) : 1.6 (0.7) | 0 : 10 ( 9.1%) | I | 0 |
## | | [numeric] | min < med < max: | 1 : 23 (20.9%) | IIII | (0.0%) |
## | | | 0 < 2 < 2 | 2 : 77 (70.0%) | IIIIIIIIIIIIII | |
## | | | IQR (CV) : 1 (0.4) | | | |
## +----+-------------+-------------------------+---------------------+------------------+---------+
## | 8 | total | Mean (sd) : 77.8 (21.9) | 12.50 : 2 ( 1.8%) | | 0 |
## | | [numeric] | min < med < max: | 25.00 : 3 ( 2.7%) | | (0.0%) |
## | | | 12.5 < 87.5 < 100 | 37.50 : 2 ( 1.8%) | | |
## | | | IQR (CV) : 37.5 (0.3) | 50.00 : 11 (10.0%) | II | |
## | | | | 62.50 : 18 (16.4%) | III | |
## | | | | 75.00 : 16 (14.5%) | II | |
## | | | | 87.50 : 23 (20.9%) | IIII | |
## | | | | 100.00 : 35 (31.8%) | IIIIII | |
## +----+-------------+-------------------------+---------------------+------------------+---------+
data %>% tabyl(case,group)
## case control app
## 3w 30 25
## 5d 25 30
print <- data %>% group_by(group) %>%
summarise(
fluid.deficit.score = (mean(deficit)/2) * 100,
ongoing.losses.score = (mean(losses)/2) * 100,
maintenance.score = (mean(mainten)/2) * 100,
base.deficit.score = (mean(base)/2) * 100,
total.score100 = (fluid.deficit.score + ongoing.losses.score + maintenance.score + base.deficit.score) / 4,
)
tab <- as_tibble(t(print), rownames = "row_names")
tab <- tab %>%
row_to_names(row_number = 1)
tab$difference <- as.numeric(tab$app) - as.numeric(tab$control)
tab <- tab %>% mutate(across(2:4,as.numeric))
tab <- tab %>% mutate(across(2:4,round,1))
tab
## # A tibble: 5 × 4
## group control app difference
## <chr> <dbl> <dbl> <dbl>
## 1 fluid.deficit.score 61.8 87.3 25.5
## 2 ongoing.losses.score 60 80.9 20.9
## 3 maintenance.score 77.3 94.5 17.3
## 4 base.deficit.score 70.9 90 19.1
## 5 total.score100 67.5 88.2 20.7
data <- merge(data,quant %>% select(id,manual_confidence),by="id")
table1::table1(~ total | manual_confidence*group, data=data)
High |
Low |
Moderate |
Very low |
Overall |
||||||
---|---|---|---|---|---|---|---|---|---|---|
control (N=2) |
app (N=2) |
control (N=21) |
app (N=21) |
control (N=24) |
app (N=24) |
control (N=6) |
app (N=6) |
control (N=55) |
app (N=55) |
|
total | ||||||||||
Mean (SD) | 87.5 (0) | 87.5 (17.7) | 63.1 (26.7) | 87.5 (17.2) | 69.8 (21.5) | 88.0 (15.8) | 66.7 (12.9) | 89.6 (16.6) | 67.5 (22.4) | 88.2 (15.9) |
Median [Min, Max] | 87.5 [87.5, 87.5] | 87.5 [75.0, 100] | 62.5 [12.5, 100] | 100 [37.5, 100] | 75.0 [25.0, 100] | 100 [50.0, 100] | 62.5 [50.0, 87.5] | 100 [62.5, 100] | 62.5 [12.5, 100] | 100 [37.5, 100] |
confidence.table <- data %>% group_by(manual_confidence,group) %>% summarise(
n = n(),
total = median(total),
deficit = 100*mean(deficit)/2,
losses = 100*mean(losses)/2,
mainten = 100*mean(mainten)/2,
base = 100*mean(base)/2
) %>% filter(group=='control')
confidence.table[c(4,2,3,1),]
## # A tibble: 4 × 8
## # Groups: manual_confidence [4]
## manual_confidence group n total deficit losses mainten base
## <chr> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Very low control 6 62.5 66.7 66.7 75 58.3
## 2 Low control 21 62.5 64.3 52.4 64.3 71.4
## 3 Moderate control 24 75 54.2 64.6 85.4 75
## 4 High control 2 87.5 75 100 100 75
Boxplot comparing total scores (out of 100)
data.long <- data %>%
pivot_longer(cols = deficit:total, names_to = "type", values_to = "score")
data.long <- data.long %>% filter(type == "total")
data.long$type[data.long$type == "total"] <- "Total"
plot1 <- ggplot(data = data.long, aes(x = type, y = score, fill=group)) +
geom_boxplot() +
labs(y = "Score out of 100", x="Group") +
ylim(0, 100) +
theme(axis.text.x = element_text(size=12, family="Times"),axis.title.x = element_text(size=15, family="Times",face="bold")) +
theme(axis.text.y = element_text(size=15, family="Times"),axis.title.y = element_text(size=15, family="Times",face="bold")) +
theme(legend.position = "bottom",
plot.title = element_text(size=15, family="Times",hjust = 0.5),
axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.title.x=element_blank(),
panel.border = element_rect(colour = "black", fill=NA, size=1),
panel.background = element_rect(fill = "white", colour = "white",size = 0.5, linetype = "solid"),
panel.grid.major = element_line(size =0, linetype = 'solid', colour = "grey"),
panel.grid.minor = element_line(size = 0, linetype = 'solid',colour = "grey")) +
scale_fill_discrete(name = "Method", labels = c("Conventional", "App-based"))
tiff("plot.tiff", units="in", width=6, height=6, res=300)
plot1
dev.off()
## quartz_off_screen
## 2
Will use a linear mixed model that accounts for the clustering of answers within students
lmm.total <- lmer(total ~ group + case + (1|id), data= data)
summary(lmm.total)
## Linear mixed model fit by REML ['lmerMod']
## Formula: total ~ group + case + (1 | id)
## Data: data
##
## REML criterion at convergence: 948.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7293 -0.5667 0.2264 0.6338 1.6996
##
## Random effects:
## Groups Name Variance Std.Dev.
## id (Intercept) 77.75 8.818
## Residual 301.15 17.354
## Number of obs: 110, groups: id, 55
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 67.216 3.028 22.196
## groupapp 20.625 3.323 6.207
## case5d 0.625 3.323 0.188
##
## Correlation of Fixed Effects:
## (Intr) groppp
## groupapp -0.499
## case5d -0.499 -0.091
output <- tidy(lmm.total,conf.int = T) %>% select(term,estimate,conf.low,conf.high) %>% filter(term == "groupapp")
icc(lmm.total, by_group = FALSE, tolerance = 1e-05)
## # Intraclass Correlation Coefficient
##
## Adjusted ICC: 0.205
## Conditional ICC: 0.160
diff <- paste0(round(output$estimate,2),
" (",
round(output$conf.low,2),
", ",
round(output$conf.high,2),
")")
tab$difference[tab$group == "total.score100"] <- diff
write.csv(tab,"components.csv")
Diagnostics
icc(lmm.total, by_group = FALSE, tolerance = 1e-05)
## # Intraclass Correlation Coefficient
##
## Adjusted ICC: 0.205
## Conditional ICC: 0.160
ggplot(data.frame(eta=predict(lmm.total,type="link"),pearson=residuals(lmm.total,type="pearson")),
aes(x=eta,y=pearson)) + geom_point() + theme_bw()
qqnorm(residuals(lmm.total))
Show dataset 2
data2$total <- data2$total / 6 * 100
data2 %>% kable
id | group | case | total | deficit | volume | alk | bicarb | rate.bicarb | oral |
---|---|---|---|---|---|---|---|---|---|
FS_1F4ndmfv4FRhMl7 | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
FS_1F4ndmfv4FRhMl7 | app | 5d | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
FS_2aQanMGUwpJZDYl | control | 5d | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
FS_2aQanMGUwpJZDYl | app | 3w | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_06gon5h75y2OtZD | control | 3w | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_06gon5h75y2OtZD | app | 5d | 83.33333 | 1 | 0 | 1 | 1 | 1 | 1 |
R_10YNVdHuP1M7BLY | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_10YNVdHuP1M7BLY | app | 5d | 66.66667 | 1 | 0 | 1 | 0 | 1 | 1 |
R_1E585h59C3GfybR | control | 5d | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_1E585h59C3GfybR | app | 3w | 50.00000 | 1 | 0 | 1 | 1 | 0 | 0 |
R_1FlfqH1Mt6W4OV4 | control | 3w | 50.00000 | 1 | 1 | 1 | 0 | 0 | 0 |
R_1FlfqH1Mt6W4OV4 | app | 5d | 33.33333 | 0 | 0 | 1 | 0 | 1 | 0 |
R_1GDeDAdiJnVB0s2 | control | 5d | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_1GDeDAdiJnVB0s2 | app | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1hG9g6mIxGn8ZWj | control | 3w | 66.66667 | 1 | 1 | 1 | 0 | 1 | 0 |
R_1hG9g6mIxGn8ZWj | app | 5d | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_1IKw2OhleiYRL4q | control | 5d | 66.66667 | 1 | 1 | 1 | 0 | 1 | 0 |
R_1IKw2OhleiYRL4q | app | 3w | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_1IMcAojZOzeJuvF | control | 3w | 50.00000 | 1 | 0 | 1 | 1 | 0 | 0 |
R_1IMcAojZOzeJuvF | app | 5d | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_1IMYbcaCx7KeA38 | control | 3w | 50.00000 | 1 | 1 | 1 | 0 | 0 | 0 |
R_1IMYbcaCx7KeA38 | app | 5d | 33.33333 | 1 | 1 | 0 | 0 | 0 | 0 |
R_1kXIx2HhCumDkmq | control | 5d | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
R_1kXIx2HhCumDkmq | app | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1l04SIKet4JM5oK | control | 3w | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_1l04SIKet4JM5oK | app | 5d | 50.00000 | 0 | 0 | 1 | 1 | 1 | 0 |
R_1LLqU4C3umOUznu | control | 3w | 66.66667 | 1 | 1 | 1 | 0 | 1 | 0 |
R_1LLqU4C3umOUznu | app | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1llydHpgYrmJIMS | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1llydHpgYrmJIMS | app | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1mVMgqxtCtSwBXO | control | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1mVMgqxtCtSwBXO | app | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1P8gxZvb4H0Shv9 | control | 5d | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
R_1P8gxZvb4H0Shv9 | app | 3w | 16.66667 | 1 | 0 | 0 | 0 | 0 | 0 |
R_1qaiQQyr8bu2Dnh | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_1qaiQQyr8bu2Dnh | app | 5d | 83.33333 | 1 | 0 | 1 | 1 | 1 | 1 |
R_1Qz719yHd5BQBFv | control | 3w | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_1Qz719yHd5BQBFv | app | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_22RcWofEoI56dsf | control | 5d | 66.66667 | 1 | 1 | 1 | 0 | 1 | 0 |
R_22RcWofEoI56dsf | app | 3w | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_29azxBaN1eR6tn9 | control | 3w | 33.33333 | 1 | 1 | 0 | 0 | 0 | 0 |
R_29azxBaN1eR6tn9 | app | 5d | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_29c9bWPlbniXPhg | control | 3w | 33.33333 | 1 | 1 | 0 | 0 | 0 | 0 |
R_29c9bWPlbniXPhg | app | 5d | 83.33333 | 1 | 1 | 1 | 0 | 1 | 1 |
R_2ClhxDDaB38uJd2 | control | 3w | 16.66667 | 0 | 0 | 1 | 0 | 0 | 0 |
R_2ClhxDDaB38uJd2 | app | 5d | 16.66667 | 0 | 0 | 1 | 0 | 0 | 0 |
R_2coWnUVOwj7YBN4 | control | 5d | 50.00000 | 1 | 1 | 1 | 0 | 0 | 0 |
R_2coWnUVOwj7YBN4 | app | 3w | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_2dQ26mYjJVtDDmw | control | 5d | 66.66667 | 1 | 0 | 1 | 0 | 1 | 1 |
R_2dQ26mYjJVtDDmw | app | 3w | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_2EHnrhzveVCptoc | control | 5d | 16.66667 | 1 | 0 | 0 | 0 | 0 | 0 |
R_2EHnrhzveVCptoc | app | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_2eXNk9BXMzAp5g2 | control | 3w | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_2eXNk9BXMzAp5g2 | app | 5d | 83.33333 | 1 | 0 | 1 | 1 | 1 | 1 |
R_2f7C3tT9Jk2UJEP | control | 3w | 83.33333 | 1 | 0 | 1 | 1 | 1 | 1 |
R_2f7C3tT9Jk2UJEP | app | 5d | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
R_2qsM6jMLPpUDkUF | control | 3w | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_2qsM6jMLPpUDkUF | app | 5d | 50.00000 | 1 | 0 | 1 | 0 | 0 | 1 |
R_2rHO6Flyml9FP5p | control | 3w | 33.33333 | 0 | 0 | 1 | 0 | 1 | 0 |
R_2rHO6Flyml9FP5p | app | 5d | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_2yjWe8cVqJm89zO | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_2yjWe8cVqJm89zO | app | 5d | 66.66667 | 0 | 0 | 1 | 1 | 1 | 1 |
R_30ipYcmaXJLh732 | control | 3w | 66.66667 | 1 | 1 | 1 | 1 | 0 | 0 |
R_30ipYcmaXJLh732 | app | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_31mUdlu6JrQ0uw8 | control | 3w | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_31mUdlu6JrQ0uw8 | app | 5d | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_3CMVIvsrKobFDCA | control | 5d | 83.33333 | 1 | 1 | 1 | 1 | 1 | 0 |
R_3CMVIvsrKobFDCA | app | 3w | 83.33333 | 1 | 1 | 1 | 1 | 1 | 0 |
R_3dRGOnsGmQcGnLh | control | 3w | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
R_3dRGOnsGmQcGnLh | app | 5d | 66.66667 | 1 | 1 | 1 | 0 | 0 | 1 |
R_3g2czbQSlDvx8JP | control | 5d | 33.33333 | 0 | 0 | 1 | 0 | 1 | 0 |
R_3g2czbQSlDvx8JP | app | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_3illfbJFkdNqkGM | control | 5d | 16.66667 | 0 | 1 | 0 | 0 | 0 | 0 |
R_3illfbJFkdNqkGM | app | 3w | 50.00000 | 1 | 1 | 1 | 0 | 0 | 0 |
R_3kKVLswnnIpQiFE | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_3kKVLswnnIpQiFE | app | 5d | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
R_3LhEYMu6J9UMzja | control | 5d | 16.66667 | 0 | 0 | 1 | 0 | 0 | 0 |
R_3LhEYMu6J9UMzja | app | 3w | 50.00000 | 0 | 0 | 1 | 1 | 1 | 0 |
R_3TWNY0AZLcA7S7v | control | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_3TWNY0AZLcA7S7v | app | 3w | 50.00000 | 1 | 1 | 1 | 0 | 0 | 0 |
R_6PfXWjedMivcSZ3 | control | 5d | 83.33333 | 1 | 1 | 1 | 1 | 1 | 0 |
R_6PfXWjedMivcSZ3 | app | 3w | 83.33333 | 1 | 0 | 1 | 1 | 1 | 1 |
R_8oVjn5iCjrNPjlT | control | 5d | 16.66667 | 1 | 0 | 0 | 0 | 0 | 0 |
R_8oVjn5iCjrNPjlT | app | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_9XZ9sme0CvR8wKt | control | 5d | 50.00000 | 1 | 1 | 1 | 0 | 0 | 0 |
R_9XZ9sme0CvR8wKt | app | 3w | 66.66667 | 1 | 0 | 1 | 0 | 1 | 1 |
R_AGSkDnfSNkFxg7T | control | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_AGSkDnfSNkFxg7T | app | 3w | 33.33333 | 1 | 0 | 0 | 0 | 0 | 1 |
R_bI3SnTlrBKH6Xx7 | control | 5d | 66.66667 | 1 | 1 | 1 | 0 | 0 | 1 |
R_bI3SnTlrBKH6Xx7 | app | 3w | 83.33333 | 1 | 0 | 1 | 1 | 1 | 1 |
R_bm7GkgUVCQpM9Mt | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_bm7GkgUVCQpM9Mt | app | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_bx6Yr5nMbIfTTtn | control | 5d | 16.66667 | 1 | 0 | 0 | 0 | 0 | 0 |
R_bx6Yr5nMbIfTTtn | app | 3w | 16.66667 | 0 | 0 | 0 | 0 | 0 | 1 |
R_C9duWufyN6qomIh | control | 3w | 83.33333 | 1 | 1 | 1 | 1 | 1 | 0 |
R_C9duWufyN6qomIh | app | 5d | 0.00000 | 0 | 0 | 0 | 0 | 0 | 0 |
R_DwQX8mRiBs84YGR | control | 3w | 66.66667 | 1 | 1 | 1 | 1 | 0 | 0 |
R_DwQX8mRiBs84YGR | app | 5d | 83.33333 | 1 | 1 | 1 | 1 | 1 | 0 |
R_pu7nnDIsRnwFhp7 | control | 3w | 16.66667 | 1 | 0 | 0 | 0 | 0 | 0 |
R_pu7nnDIsRnwFhp7 | app | 5d | 100.00000 | 1 | 1 | 1 | 1 | 1 | 1 |
R_RrkyKiRuWP7rTIR | control | 5d | 33.33333 | 1 | 0 | 1 | 0 | 0 | 0 |
R_RrkyKiRuWP7rTIR | app | 3w | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
R_SAUEuXWSTQWNFeh | control | 3w | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_SAUEuXWSTQWNFeh | app | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_WwiQDYmMooTAA2l | control | 3w | 50.00000 | 1 | 0 | 1 | 1 | 0 | 0 |
R_WwiQDYmMooTAA2l | app | 5d | 66.66667 | 1 | 0 | 1 | 1 | 1 | 0 |
R_Z2BJEtTVJ4rVOqR | control | 5d | 66.66667 | 1 | 1 | 1 | 0 | 1 | 0 |
R_Z2BJEtTVJ4rVOqR | app | 3w | 50.00000 | 1 | 0 | 1 | 0 | 0 | 1 |
R_ZwY8Rfs5r6csG9X | control | 3w | 50.00000 | 1 | 0 | 1 | 0 | 1 | 0 |
R_ZwY8Rfs5r6csG9X | app | 5d | 83.33333 | 1 | 0 | 1 | 1 | 1 | 1 |
print(summarytools::dfSummary(data2,valid.col=FALSE, graph.magnif=0.8, style="grid"))
## Data Frame Summary
## data2
## Dimensions: 110 x 10
## Duplicates: 0
##
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | No | Variable | Stats / Values | Freqs (% of Valid) | Graph | Missing |
## +====+=============+=======================+=====================+===================+=========+
## | 1 | id | 1. FS_1F4ndmfv4FRhMl7 | 2 ( 1.8%) | | 0 |
## | | [character] | 2. FS_2aQanMGUwpJZDYl | 2 ( 1.8%) | | (0.0%) |
## | | | 3. R_06gon5h75y2OtZD | 2 ( 1.8%) | | |
## | | | 4. R_10YNVdHuP1M7BLY | 2 ( 1.8%) | | |
## | | | 5. R_1E585h59C3GfybR | 2 ( 1.8%) | | |
## | | | 6. R_1FlfqH1Mt6W4OV4 | 2 ( 1.8%) | | |
## | | | 7. R_1GDeDAdiJnVB0s2 | 2 ( 1.8%) | | |
## | | | 8. R_1hG9g6mIxGn8ZWj | 2 ( 1.8%) | | |
## | | | 9. R_1IKw2OhleiYRL4q | 2 ( 1.8%) | | |
## | | | 10. R_1IMcAojZOzeJuvF | 2 ( 1.8%) | | |
## | | | [ 45 others ] | 90 (81.8%) | IIIIIIIIIIIIIIII | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 2 | group | 1. app | 55 (50.0%) | IIIIIIIIII | 0 |
## | | [character] | 2. control | 55 (50.0%) | IIIIIIIIII | (0.0%) |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 3 | case | 1. 3w | 55 (50.0%) | IIIIIIIIII | 0 |
## | | [character] | 2. 5d | 55 (50.0%) | IIIIIIIIII | (0.0%) |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 4 | total | Mean (sd) : 58.5 (24) | 0.00 : 1 ( 0.9%) | | 0 |
## | | [numeric] | min < med < max: | 16.67!: 10 ( 9.1%) | I | (0.0%) |
## | | | 0 < 66.7 < 100 | 33.33!: 17 (15.5%) | III | |
## | | | IQR (CV) : 29.2 (0.4) | 50.00 : 21 (19.1%) | III | |
## | | | | 66.67!: 37 (33.6%) | IIIIII | |
## | | | | 83.33!: 13 (11.8%) | II | |
## | | | | 100.00 : 11 (10.0%) | II | |
## | | | | ! rounded | | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 5 | deficit | Min : 0 | 0 : 12 (10.9%) | II | 0 |
## | | [numeric] | Mean : 0.9 | 1 : 98 (89.1%) | IIIIIIIIIIIIIIIII | (0.0%) |
## | | | Max : 1 | | | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 6 | volume | Min : 0 | 0 : 74 (67.3%) | IIIIIIIIIIIII | 0 |
## | | [numeric] | Mean : 0.3 | 1 : 36 (32.7%) | IIIIII | (0.0%) |
## | | | Max : 1 | | | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 7 | alk | Min : 0 | 0 : 12 (10.9%) | II | 0 |
## | | [numeric] | Mean : 0.9 | 1 : 98 (89.1%) | IIIIIIIIIIIIIIIII | (0.0%) |
## | | | Max : 1 | | | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 8 | bicarb | Min : 0 | 0 : 55 (50.0%) | IIIIIIIIII | 0 |
## | | [numeric] | Mean : 0.5 | 1 : 55 (50.0%) | IIIIIIIIII | (0.0%) |
## | | | Max : 1 | | | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 9 | rate.bicarb | Min : 0 | 0 : 40 (36.4%) | IIIIIII | 0 |
## | | [numeric] | Mean : 0.6 | 1 : 70 (63.6%) | IIIIIIIIIIII | (0.0%) |
## | | | Max : 1 | | | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
## | 10 | oral | Min : 0 | 0 : 81 (73.6%) | IIIIIIIIIIIIII | 0 |
## | | [numeric] | Mean : 0.3 | 1 : 29 (26.4%) | IIIII | (0.0%) |
## | | | Max : 1 | | | |
## +----+-------------+-----------------------+---------------------+-------------------+---------+
data2$group <- fct_relevel(data2$group,"control")
#data2 %>% glimpse
tab2 <- data2 %>% group_by(group) %>%
summarise(
total.score.mean = (mean(total)),
deficit.score = mean(deficit)*100,
volume.score = mean(volume)*100,
alk.score = mean(alk)*100,
bicarb.score = mean(bicarb)*100,
rate.bicarb.score = mean(rate.bicarb)*100,
oral.score = mean(oral)*100
)
tab2 <- as_tibble(t(tab2), rownames = "row_names")
tab2 <- tab2 %>%
row_to_names(row_number = 1)
tab2$difference <- as.numeric(tab2$app) - as.numeric(tab2$control)
tab2 <- tab2 %>% mutate(across(2:4,as.numeric))
tab2 <- tab2 %>% mutate(across(2:4,round,1))
tab2
## # A tibble: 7 × 4
## group control app difference
## <chr> <dbl> <dbl> <dbl>
## 1 total.score.mean 51.2 65.8 14.5
## 2 deficit.score 90.9 87.3 -3.6
## 3 volume.score 34.5 30.9 -3.6
## 4 alk.score 87.3 90.9 3.6
## 5 bicarb.score 36.4 63.6 27.3
## 6 rate.bicarb.score 50.9 76.4 25.5
## 7 oral.score 7.3 45.5 38.2
data2 <- merge(data2,quant %>% select(id,manual_confidence),by="id")
table1::table1(~ total | manual_confidence*group, data=data2)
High |
Low |
Moderate |
Very low |
Overall |
||||||
---|---|---|---|---|---|---|---|---|---|---|
control (N=2) |
app (N=2) |
control (N=21) |
app (N=21) |
control (N=24) |
app (N=24) |
control (N=6) |
app (N=6) |
control (N=55) |
app (N=55) |
|
total | ||||||||||
Mean (SD) | 58.3 (11.8) | 66.7 (0) | 50.0 (23.6) | 66.7 (23.0) | 52.1 (20.4) | 64.6 (25.7) | 50.0 (21.1) | 55.6 (29.2) | 51.2 (21.0) | 65.8 (24.7) |
Median [Min, Max] | 58.3 [50.0, 66.7] | 66.7 [66.7, 66.7] | 50.0 [16.7, 100] | 66.7 [16.7, 100] | 58.3 [16.7, 83.3] | 66.7 [0, 100] | 58.3 [16.7, 66.7] | 58.3 [16.7, 100] | 50.0 [16.7, 100] | 66.7 [0, 100] |
data.long <- data2 %>%
pivot_longer(cols = total:oral, names_to = "type", values_to = "score")
data.long$type[data.long$type == "total"] <- "Total"
data.long$type[data.long$type == "isotonic"] <- "Appropriate isotonic fluid"
data.long$type[data.long$type == "deficit"] <- "Volume sufficient to correct deficit"
data.long$type[data.long$type == "volume"] <- "Volume sufficient overall"
data.long$type[data.long$type == "alk"] <- "Use of alkalinising solution"
data.long$type[data.long$type == "bicarb"] <- "Appropriate volume of alkalinising solution"
data.long$type[data.long$type == "rate.bicarb"] <- "Appropriate rate for alkalinising solution"
data.long$type[data.long$type == "rate.other"] <- "Appropriate rate for other fluids"
data.long$type[data.long$type == "oral"] <- "Fluid plan incorperates oral fluids"
plot1 <- ggplot(data = data.long %>% filter(type != "Total"), aes(x = type, y = score)) +
geom_boxplot(aes(fill=group)) +
labs(y = "Score", x="Calculation") +
theme(axis.text.x = element_text(size=12, family="Times"),axis.title.x = element_text(size=15, family="Times",face="bold")) +
theme(axis.text.y = element_text(size=15, family="Times"),axis.title.y = element_text(size=15, family="Times",face="bold")) +
theme(plot.title = element_text(size=15, family="Times",hjust = 0.5)) +
theme(panel.border = element_rect(colour = "black", fill=NA, size=1),
panel.background = element_rect(fill = "white", colour = "white",size = 0.5, linetype = "solid"),
panel.grid.major = element_line(size =0, linetype = 'solid', colour = "grey"),
panel.grid.minor = element_line(size = 0, linetype = 'solid',colour = "grey")) # +scale_fill_brewer(palette="Set1")
#plot1
Boxplot comparing total score (out of 100) for App and Control scenarios
data.long <- data.long %>% filter(type == "Total")
plot2 <- ggplot(data = data.long, aes(x = type, y = score, fill=group)) +
geom_boxplot() +
labs(y = "Score out of 100", x="Group") +
theme(axis.text.x = element_text(size=12, family="Times"),axis.title.x = element_text(size=15, family="Times",face="bold")) +
theme(axis.text.y = element_text(size=15, family="Times"),axis.title.y = element_text(size=15, family="Times",face="bold")) +
theme(legend.position = "bottom",
plot.title = element_text(size=15, family="Times",hjust = 0.5),
axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.title.x=element_blank(),
panel.border = element_rect(colour = "black", fill=NA, size=1),
panel.background = element_rect(fill = "white", colour = "white",size = 0.5, linetype = "solid"),
panel.grid.major = element_line(size =0, linetype = 'solid', colour = "grey"),
panel.grid.minor = element_line(size = 0, linetype = 'solid',colour = "grey")) +
scale_fill_discrete(name = "Method", labels = c("Conventional", "App-based"))
tiff("plot2.tiff", units="in", width=6, height=6, res=300)
plot2
dev.off()
## quartz_off_screen
## 2
Will use a linear mixed model that accounts for the clustering of answers within students
lmm.total <- lmer(total ~ group + case + (1|id), data = data2)
summary(lmm.total)
## Linear mixed model fit by REML ['lmerMod']
## Formula: total ~ group + case + (1 | id)
## Data: data2
##
## REML criterion at convergence: 985.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.86037 -0.70381 0.02638 0.62353 1.92919
##
## Random effects:
## Groups Name Variance Std.Dev.
## id (Intercept) 58.59 7.654
## Residual 471.77 21.720
## Number of obs: 110, groups: id, 55
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 51.4956 3.6004 14.303
## groupapp 14.6281 4.1758 3.503
## case5d -0.6496 4.1758 -0.156
##
## Correlation of Fixed Effects:
## (Intr) groppp
## groupapp -0.506
## case5d -0.506 -0.127
output <- tidy(lmm.total,conf.int = T) %>% select(term,estimate,conf.low,conf.high) %>% filter(term == "groupapp")
diff2 <- paste0(round(output$estimate,2),
" (",
round(output$conf.low,2),
", ",
round(output$conf.high,2),
")")
tab2$difference[tab2$group == "total.score.mean"] <- diff2
write.csv(tab2,"plan.csv")
Model diagnostics
#check_model(lmm.total)
icc(lmm.total, by_group = FALSE, tolerance = 1e-05)
## # Intraclass Correlation Coefficient
##
## Adjusted ICC: 0.110
## Conditional ICC: 0.100
ggplot(data.frame(eta=predict(lmm.total,type="link"),pearson=residuals(lmm.total,type="pearson")),
aes(x=eta,y=pearson)) + geom_point() + theme_bw()
qqnorm(residuals(lmm.total))
library(stats)
wilcox.test(data2$total ~ data2$group)
con <- data2 %>% filter(group == "control")
app <- data2 %>% filter(group == "app")
data2.wide <- merge(con,app, by="id")
data2.wide$total <- data2.wide$total.y - data2.wide$total.x
hist(data2.wide$total)