Q1. Say, we are exploring the association between diabetes exposure (no, diabetes type 1, diabetes type 2) and CVD outcome (no, acute, chronic). Which of the following code can be used to fit the model?
- A. fit <- glm(CVD ~ diabetes, data = analytic.data, family = binomial)
- B. fit <- glm(I(CVD == 'chronic') ~ diabetes, data = analytic.data, family = binomial)
- C. fit <- multinom(CVD ~ diabetes, data = analytic.data)
- D. fit <- svy_vglm(CVD ~ diabetes, data = analytic.data)
We use glm for binary outcome and svyglm for survey data analysis.
Q2. Say, we want to explore the relationship between arthritis (binary exposure) and time to CVD development (survival outcome). Which of the following code can be used to fit the cox porportional hazards model?
- A. fit2 <- survfit(Surv(time, cvd) ~ arthritis, data = analytic.data)
- B. fit2 <- survdiff(Surv(time, cvd) ~ arthritis, data = analytic.data)
- C. fit2 <- coxph(Surv(time, cvd) ~ arthritis, data = analytic.data)
- D. fit2 <- glm(cvd ~ arthritis, data = analytic.data)