1/28
Looks like no tags are added yet.
What is a binary outcome?
An outcome with only two possible categories, e.g. cancer recurrence (yes/no) or survival (alive/dead).
What is the difference between an outcome and a covariate (predictor)?
The outcome (Y) is what we want to investigate or predict. The covariate (X) is the variable that may be associated with the outcome.
What is the difference between probability and odds?
How do you convert odds into probability?
How do you calculate the odds ratio from a 2 × 2 contingency table?
Probability = number of events / total number of observations.
Odds = probability of event / probability of no event.
Formula:
Odds = p / (1 − p)
Probability = Odds / (1 + Odds).
OR = (a × d) / (b × c).
What are the formulas for risk difference, relative risk and odds ratio?
RD = Risk in group 2 − Risk in group 1.
RR = Risk in group 2 / Risk in group 1.
OR = Odds in group 2 / Odds in group 1.
What is the null value for RD, RR and OR?
RD: 0.
RR: 1.
OR: 1.
When is an odds ratio statistically significant based on its 95% confidence interval?
When the confidence interval does not include 1.
What is the difference between a chi-square test and Fisher's exact test?
Both investigate associations between categorical variables. Fisher's exact test is used when one or more expected cell counts are below 5.
What does a significant overall chi-square test tell us when comparing three or more groups?
At least one group differs, but it does not tell us which specific groups differ. Pairwise comparisons are needed.
In a study, 40 out of 100 patients develop metastasis. Calculate the probability and odds.
Probability = 40/100 = 0.40.
Odds = 40/60 = 0.667.
A study reports an OR of 2.5. Interpret this result.
The odds of the outcome are 2.5 times higher in the exposed group compared with the reference group.
A logistic regression model gives an OR of 0.65 (95% CI: 0.42–0.91). Interpret the result.
The exposed group has 0.65 times the odds of the outcome compared with the reference group. The association is statistically significant because the CI excludes 1.
A logistic regression model gives an OR of 1.08 per year of age. Interpret this result.
Every one-year increase in age is associated with 1.08 times the odds of the outcome (8% higher odds).
The regression coefficient for age is 0.036486. Calculate the OR for a five-year increase in age.
OR = exp(5 × 0.036486)
OR = exp(0.18243) = approximately 1.20.
The odds increase by approximately 20%.
In a diabetes study, 44 out of 92 patients older than 50 have diabetes. Calculate the probability of diabetes in this group.
44/92 = 0.478 = 47.8%.
A logistic regression model gives an intercept of −2.5903. What does the intercept represent?
A: The log odds of the outcome when all predictors equal zero. For a binary predictor, this represents the reference group.
What is the reference category in logistic regression?
A: The baseline category against which the other categories are compared. Its coefficient is represented by zero.
What is the linearity assumption in logistic regression?
A continuous predictor should have a linear relationship with the log odds of the binary outcome. If this assumption is not valid, the predictor can be treated as categorical.
What is the difference between linear and logistic regression?
Linear regression: continuous outcome; predicts a numerical value.
Logistic regression: binary outcome; estimates the probability of an event and models its odds.
A researcher investigates whether poor sleep quality (yes/no) is associated with hypertension (yes/no). Name two statistical methods that can investigate this association.
Chi-square test.
Logistic regression.
A chi-square test produces expected cell counts of 37.3, 5.7, 8.7 and 1.3. Is the chi-square test valid? Explain.
No. One expected cell count is below 5 (1.3). Fisher's exact test should be used instead.
A study compares lung cancer mortality between former, moderate and heavy smokers. The overall chi-square test is significant. What should the researcher do next?
A: Perform pairwise comparisons between the three groups and apply a multiple-testing correction, such as Bonferroni correction.
A logistic regression model gives a coefficient of 2.1848 for poor sleep quality, with p = 0.0131. Is the association statistically significant?
A: Yes. Since p = 0.0131 is below 0.05, there is statistically significant evidence of an association between poor sleep quality and hypertension.
R-question: How do you create a contingency table between two categorical variables?
table(datax,datay)
R-question: How do you perform a chi-square test between two categorical variables?
chisq.test(datax,datay)
R-question: How do you obtain the expected cell counts from a chi-square test?
chisq.test(datax,datay)$expected
R-question: How do you perform Fisher's exact test?
fisher.test(datax,datay)
R-question: Write the R code to fit a logistic regression model investigating whether age predicts diabetes.
model <- glm(diabetes ~ age,
data = SynthDiabetes2,
family = "binomial")
summary(model)
R-question: How do you obtain the odds ratios and their 95% confidence intervals from a logistic regression model?
exp(coef(model))
exp(confint(model))
Purpose | R command |
|---|---|
Contingency table |
|
Chi-square test |
|
Expected counts |
|
Fisher's exact test |
|
Logistic regression |
|
Model summary |
|
Regression coefficients |
|
Confidence intervals |
|
Odds ratios |
|
OR confidence intervals |
|
Pairwise comparisons |
|