Q1. Let you have five categorical variables 'age', 'sex', 'race', 'education', and 'income' in your data frame called mydat. You labelled these variables as factvars <- c('age', 'sex', 'race', 'education', 'income') and are interested in converting these categorical variables to factors at once. How could you do it in R?
Q2. Let we are interested in exploring the relationship between rheumatoid arthritis (binary exposure variable defined as whether the doctor ever told the participant has rheumatoid arthritis) and diabetes (binary outcome variable defined as whether the doctor ever told the participant has diabetes) among US adults using NHANES 2015-16 dataset. What are the PICOT elements in this example: