Back to Course

FoSSA Français

0% Complete
0/0 Steps
  1. Information sur le cours

    Rencontrez l'équipe enseignante
  2. Jeu de données du cours 1
  3. Jeu de données du cours 2
  4. MODULE A1: INTRODUCTION AUX STATISTIQUES AVEC R ET STATA
    A1.1 Qu'est-ce que les Statistiques?
  5. A1.2.1a Introduction à Stata
  6. A1.2.2b: Introduction à R
  7. A1.2.2c: Introduction to SPSS
  8. A1.3: Statistiques Descriptives
  9. A1.4: Estimations et Intervalles de Confiance
  10. A1.5: Tests d'Hypothèses
  11. A1.6: Transformation de Variables
  12. Fin du Module A1
    1 Quiz
  13. MODULE A2: CALCULS DE PUISSANCE STATISTIQUE & DE TAILLE D’ÉCHANTILLON
    A2.1 Concepts Clés
  14. A2.2 Calculs de puissance pour une différence de moyennes
  15. A2.3 Calculs de puissance pour une différence de proportions
  16. A2.4 Calcul de taille d’échantillon pour les essais randomisés (RCTs)
  17. A2.5 Calculs de taille d’échantillon pour les études transversales (ou sondages)
  18. A2.6 Calcul de taille d'échantillon pour un devis cas-contrôle
  19. Fin du Module A2
    1 Quiz
  20. MODULE B1: RÉGRESSION LINÉAIRE
    B1.1 Corrélation et Nuages de Points (scatterplots)
  21. B1.2 Différences Entre Moyennes (ANOVA à un facteur)
  22. B1.3 Régression Linéaire Univariée
  23. B1.4 Régression Linéaire Multivariée
  24. B1.5 Sélection de Modèles et Tests F
  25. B1.6 Diagnostics de Régression
  26. Fin du Module B1
    1 Quiz
  27. MODULE B2: COMPARAISONS MULTIPLES & MESURES RÉPÉTÉES
    B2.1 ANOVA Approfondie— Tests Post-Hoc
  28. B2.2 Correction pour Comparaisons Multiples
  29. B2.3 ANOVA à deux facteurs (Two-way ANOVA)
  30. B2.4 Mesures Répétées et Test T Apparié
  31. B2.5 ANOVA pour Mesures Répétées
  32. Fin du Module B2
    1 Quiz
  33. MODULE B3: MÉTHODES NON-PARAMETRIC
    B3.1 Hypothèses des Tests Paramétriques
  34. B3.2 Test U de Mann-Whitney
  35. B3.3 Test de Kruskal-Wallis
  36. B3.4 Test des rangs signés de Wilcoxon
  37. B3.5 Test de Friedman
  38. B3.6 Corrélation des Rangs de Spearman
  39. Fin du Module B3
    1 Quiz
  40. MODULE C1: DONNÉES BINAIRES & RÉGRESSION LOGISTIQUE
    C1.1 Introduction à la prévalence, au Risque, aux Cotes (Odds) et aux Taux
  41. C1.2 Le Test du Chi Carré & le Test de Tendance
  42. C1.3 Régression Logistique Univariée
  43. C1.4 Régression Logistique Multivariée
  44. Fin du Module C1
    1 Quiz
  45. MODULE C2: DONNÉES DE SURVIE
    C2.1 Introduction aux Données de Survie
  46. C2.2 Fonction de Survie de Kaplan-Meier & Test du Log-Rank
  47. C2.3 Régression de Cox à Risque Proportionnel
  48. C2.4 Régression de Poisson
  49. Fin du Module C2
    1 Quiz
Lesson 43 of 49
In Progress

C1.4 Régression Logistique Multivariée

Learning Outcomes

By the end of this section, students will be able to:

  • Control the association of an exposure for additional variables in a logistic regression model

You can download a copy of the slides here: Video C1.4

Video C1.4 – Controlling for Confounding in Logistic Regression (6 minutes)

C1.4 PRACTICAL: Stata

Controlling for confounders in a logistic regression

Now use the logistic command to obtain the odds ratio for prior CVD with hypertension, adjusted for HDL-C.  Similar to the command in linear regression, we add additional variables after the exposure on the command line. This may be obtained as follows:

logistic prior_cvd hyperten hdlc

Note that the output gives us the odds ratio for ‘hyperten’ adjusted for ‘hdlc’ but it also gives us the odds ratios for ‘hdlc’ adjusted for ‘hyperten’.

You will run and interpret this command in the questions below.

We can control for additional variables as well by adding additional variables to the command line as we did above with ‘hdlc’. Each variable we put in the model will be controlled for all the other variables in the model. That is, if we add BMI group to this logistic regression above, we would interpret the coefficient for hypertension as ‘the association of hypertension with the odds of prior CVD, independent (or adjusted for) of HDL-C and BMI group’. BMI group would likewise be interpreted as the association of BMI group with prior CVD, once adjusted for hypertension and HDL-C.

Question C1.4b: What are the odds of having prior CVD if a participant is hypertensive, once you have adjusted for their levels of HDL-C?

C1.4b Answers

Answer C1.4b:

logistic prior_cvd i.hyperten hdlc

Logistic regression                                     Number of obs =  4,293
                                                        LR chi2(2)    =  86.59
                                                        Prob > chi2   = 0.0000
Log likelihood = -2371.6353                             Pseudo R2     = 0.0179

——————————————————————————
   prior_cvd | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
————-+—————————————————————-
  1.hyperten |   1.551415   .1191582     5.72   0.000     1.334598    1.803456
        hdlc |   .4996367   .0501632    -6.91   0.000     .4103876    .6082952
       _cons |   .6155069    .070238    -4.25   0.000     .4921515    .7697807
——————————————————————————
Note: _cons estimates baseline odds.

Here, the odds ratio for prior CVD is 1.55 times greater for participants that are hypertensive rather than normotensive, once adjusted for HDL-C (95% CI: 1.33-1.80).

C1.4 PRACTICAL: SPSS

Controlling for confounders in a logistic regression

You can control for additional variables by adding more variables to the ‘Covariates’ box within the logistic regression analysis pop up. Here we are going to use this to obtain the odds ratio for prior CVD with hypertension, adjusted for HDL-C.

Each variable we put in the model will be controlled for all the other variables in the model. That is, if we add BMI group to this logistic regression above, we would interpret the coefficient for hypertension as ‘the association of hypertension with the odds of prior CVD, independent (or adjusted for) of HDL-C and BMI group’. BMI group would likewise be interpreted as the association of BMI group with prior CVD, once adjusted for hypertension and HDL-C.

Question C1.4a: What are the odds of having prior CVD if a participant is hypertensive, once you have adjusted for their levels of HDL-C?

Answer

The output table will look like the below.

Here, the odds ratio for prior CVD is 1.55 times greater for participants that are hypertensive rather than normotensive, once adjusted for HDL-C (95% CI: 1.34-1.80).

C1.4 PRACTICAL: R

Controlling for confounders in a logistic regression

Now use the ‘glm() ‘ command to obtain the odds ratio for prior CVD with hypertension, adjusted for HDL-C. This may be obtained as follows:

model <- glm(prior_cvd ~ hypertens + hdlc, family = binomial(link = “logit”), data = df)

Note that the output gives us the odds ratio for ‘hyperten’ adjusted for ‘hdlc’ but it also gives us the odds ratios for ‘hdlc’ adjusted for ‘hyperten’.

You will run and interpret this command in the questions below.

We can control for additional variables as well by adding additional variables to the command line as we did above with ‘hdlc’. Each variable we put in the model will be controlled for all the other variables in the model. That is, if we add BMI group to this logistic regression above, we would interpret the coefficient for hypertension as ‘the association of hypertension with the odds of prior CVD, independent of (or adjusted for) HDL-C and BMI group’. BMI group would likewise be interpreted as the association of BMI group with prior CVD, once adjusted for hypertension and HDL-C.

  • Question C1.4b: What are the odds of having prior CVD if a participant is hypertensive, once you have adjusted for their levels of HDL-C?
Answer

Answer C1.4a:

> model8 <- glm(prior_cvd ~ hyperten + hdlc, family = binomial(link = “logit”), data = df)
> summary(model8)

Call:
glm(formula = prior_cvd ~ hyperten + hdlc, family = binomial(link = “logit”), data = df)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.1004  -0.7844  -0.6978   1.2748   2.3248  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -0.4722     0.1144  -4.127 3.67e-05 ***
hyperten      0.4432     0.0770   5.756 8.59e-09 ***
hdlc         -0.7038     0.1007  -6.991 2.73e-12 ***

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4805.5  on 4265  degrees of freedom

Residual deviance: 4717.3  on 4263  degrees of freedom
AIC: 4723.3

Number of Fisher Scoring iterations: 4

> exp(cbind(coef(model8), confint(model8)))
Waiting for profiling to be done…
                          2.5 %    97.5 %
(Intercept) 0.6236630 0.4984294 0.7805407
hyperten    1.5577272 1.3388762 1.8107175
hdlc        0.4946928 0.4055012 0.6017479 

Here, the odds ratio for prior CVD is 1.56 times higher in those with hypertension compared to those without hypertension, after adjusting for HDL-C (OR: 1.56, 95% CI: 1.34-1.81).

👋 Before you go, leave an anonymous rating & feedback

Average rating 4.8 / 5. Vote count: 13

No votes so far! Be the first to rate this post.

Please share any positive or negative feedback you may have.

Feedback is completely anonymous

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Questions or comments?x