• No results found

Régression logistique : introduction

N/A
N/A
Protected

Academic year: 2021

Share "Régression logistique : introduction"

Copied!
14
0
0

Loading.... (view fulltext now)

Full text

(1)

Pr. Bruno Falissard

Régression logistique : introduction

Introduction à la statistique avec R

(2)

• Expliquer un risque suicidaire élevé en prison par

– La durée de la peine

– L’existence de mesures disciplinaire

– Des antécédents d’abus dans l’enfance

Introduction à la statistique avec R > Régression logistique : introduction

(3)

Pr. Bruno Falissard

• Haut risque de suicide = a + b

duree + c

discip + d

abus + bruit

Les limites de la régression linéaire

(4)

• Haut risque de suicide = a + b

duree + c

discip + d

abus + bruit

• La distribution du « bruit » est normale, donc

« a + b

duree + c

discip + d

abus + bruit » varie entre

plus et moins l’infini, or la variable « haut risque de suicide »

est binaire…

Les limites de la régression linéaire

(5)

Pr. Bruno Falissard

abus

d

discip

c

duree

b

a

oui

suicide

HR

prob

oui

suicide

HR

prob

Log

)

(

1

Les limites de la régression linéaire

(6)

abus

d

discip

c

duree

b

a

oui

suicide

HR

prob

oui

suicide

HR

prob

Log

)

(

1

Les limites de la régression linéaire

Introduction à la statistique avec R > Régression logistique : introduction

(7)

Pr. Bruno Falissard

Une seule variable explicative

Introduction à la statistique avec R > Régression logistique : introduction

𝐿𝑜𝑔

𝑝𝑟𝑜𝑏 ℎ𝑎𝑢𝑡 𝑟𝑖𝑠𝑞𝑢𝑒 𝑑𝑒 𝑠𝑢𝑖𝑐𝑖𝑑𝑒

(8)

Une seule variable explicative

Introduction à la statistique avec R > Régression logistique : introduction

> mod1 <- glm(suicide.hr~abus, data=smp.l, family="binomial")

> summary(mod1) Call:

glm(formula = suicide.hr ~ abus, family = "binomial", data = smp.l) Deviance Residuals:

Min 1Q Median 3Q Max -0.8446 -0.6020 -0.6020 -0.6020 1.8959 Coefficients:

Estimate Std. Error z value Pr(>|z|) (Intercept) -1.6161 0.1154 -14.003 < 2e-16 *** abus 0.7688 0.1897 4.052 5.07e-05 ***

---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1)

Null deviance: 760.21 on 752 degrees of freedom Residual deviance: 744.26 on 751 degrees of freedom

(46 observations deleted due to missingness) AIC: 748.26

Number of Fisher Scoring iterations: 4

𝐿𝑜𝑔

𝑝𝑟𝑜𝑏 ℎ𝑎𝑢𝑡 𝑟𝑖𝑠𝑞𝑢𝑒 𝑑𝑒 𝑠𝑢𝑖𝑐𝑖𝑑𝑒

(9)

Pr. Bruno Falissard

Une seule variable explicative

Introduction à la statistique avec R > Régression logistique : introduction

> mod1 <- glm(suicide.hr~abus, data=smp.l, family="binomial") > summary(mod1)

Call:

glm(formula = suicide.hr ~ abus, family = "binomial", data = smp.l) Deviance Residuals:

Min 1Q Median 3Q Max -0.8446 -0.6020 -0.6020 -0.6020 1.8959 Coefficients:

Estimate Std. Error z value Pr(>|z|) (Intercept) -1.6161 0.1154 -14.003 < 2e-16 *** abus 0.7688 0.1897 4.052 5.07e-05 ***

---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1)

Null deviance: 760.21 on 752 degrees of freedom Residual deviance: 744.26 on 751 degrees of freedom

(46 observations deleted due to missingness) AIC: 748.26

Number of Fisher Scoring iterations: 4

𝐿𝑜𝑔

𝑝𝑟𝑜𝑏 ℎ𝑎𝑢𝑡 𝑟𝑖𝑠𝑞𝑢𝑒 𝑑𝑒 𝑠𝑢𝑖𝑐𝑖𝑑𝑒

(10)

Une seule variable explicative

Introduction à la statistique avec R > Régression logistique : introduction

> mod1 <- glm(suicide.hr~abus, data=smp.l, family="binomial") > summary(mod1)

Call:

glm(formula = suicide.hr ~ abus, family = "binomial", data = smp.l) Deviance Residuals:

Min 1Q Median 3Q Max -0.8446 -0.6020 -0.6020 -0.6020 1.8959 Coefficients:

Estimate Std. Error z value Pr(>|z|) (Intercept) -1.6161 0.1154 -14.003 < 2e-16 *** abus 0.7688 0.1897 4.052 5.07e-05 ***

---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1)

Null deviance: 760.21 on 752 degrees of freedom Residual deviance: 744.26 on 751 degrees of freedom

(46 observations deleted due to missingness) AIC: 748.26

Number of Fisher Scoring iterations: 4

𝐿𝑜𝑔

𝑝𝑟𝑜𝑏 ℎ𝑎𝑢𝑡 𝑟𝑖𝑠𝑞𝑢𝑒 𝑑𝑒 𝑠𝑢𝑖𝑐𝑖𝑑𝑒

(11)

Pr. Bruno Falissard

Une seule variable explicative

Introduction à la statistique avec R > Régression logistique : introduction

> mod1 <- glm(suicide.hr~abus, data=smp.l, family="binomial") > summary(mod1)

Call:

glm(formula = suicide.hr ~ abus, family = "binomial", data = smp.l) Deviance Residuals:

Min 1Q Median 3Q Max -0.8446 -0.6020 -0.6020 -0.6020 1.8959 Coefficients:

Estimate Std. Error z value Pr(>|z|) (Intercept) -1.6161 0.1154 -14.003 < 2e-16 *** abus 0.7688 0.1897 4.052 5.07e-05 ***

---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1)

Null deviance: 760.21 on 752 degrees of freedom Residual deviance: 744.26 on 751 degrees of freedom

(46 observations deleted due to missingness) AIC: 748.26

Number of Fisher Scoring iterations: 4

𝐿𝑜𝑔

𝑝𝑟𝑜𝑏 ℎ𝑎𝑢𝑡 𝑟𝑖𝑠𝑞𝑢𝑒 𝑑𝑒 𝑠𝑢𝑖𝑐𝑖𝑑𝑒

(12)

> mod1 <- glm(suicide.hr~abus, data=smp.l, family="binomial") > summary(mod1)

Call:

glm(formula = suicide.hr ~ abus, family = "binomial", data = smp.l) Deviance Residuals:

Min 1Q Median 3Q Max -0.8446 -0.6020 -0.6020 -0.6020 1.8959 Coefficients:

Estimate Std. Error z value Pr(>|z|) (Intercept) -1.6161 0.1154 -14.003 < 2e-16 *** abus 0.7688 0.1897 4.052 5.07e-05 ***

---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1)

Null deviance: 760.21 on 752 degrees of freedom Residual deviance: 744.26 on 751 degrees of freedom

(46 observations deleted due to missingness) AIC: 748.26

Number of Fisher Scoring iterations: 4

Une seule variable explicative

Introduction à la statistique avec R > Régression logistique : introduction

𝐿𝑜𝑔

𝑝𝑟𝑜𝑏 ℎ𝑎𝑢𝑡 𝑟𝑖𝑠𝑞𝑢𝑒 𝑑𝑒 𝑠𝑢𝑖𝑐𝑖𝑑𝑒

(13)

Pr. Bruno Falissard

Une seule variable explicative

Introduction à la statistique avec R > Régression logistique : introduction

> exp(0.7688)

[1] 2.157176

> library(Epi)

> twoby2(1-smp.l$suicide.hr, 1-smp.l$abus)

2 by 2 table analysis:

---Outcome : 0

Comparing : 0 vs. 1

0 1 P(0) 95% conf. interval

0 63 90 0.4118 0.3366 0.4913

1 147 453 0.2450 0.2122 0.2810

95% conf. interval

Relative Risk: 1.6807 1.3276 2.1276

Sample Odds Ratio: 2.1571 1.4873 3.1287

Conditional MLE Odds Ratio: 2.1547 1.4577 3.1764

Probability difference: 0.1668 0.0837 0.2525

Exact P-value: 1e-04

Asymptotic P-value: 1e-04

(14)

---Conclusion

mod1 <- glm(suicide.hr~abus, data=smp.l, family="binomial")

summary(mod1)

exp(0,7688)

library(Epi)

twoby2(1-smp.l$suicide.hr, 1-smp.l$abus)

References

Related documents

The protective barrier effects of Rhinosectan ® were evaluated by: TEER (trans-epithelial electrical resistance) (preser- vation of tight junctions), Lucifer Yellow

The threats commonly faced by Southeast Asian countries include the rising trend of imports (maize, soybean, soybean meal and rice, among others); supply shortages in the

It was found that the ammonium sulfate fraction obtained be- tween 0.25 and 0.4 saturation oxidized NADH with either indoleacetaldehyde or p-nitrobenzaldehyde as

Since the acoustic signals are expected to be attenuated and dispersed when propagating along the pipe, empirical mode decomposition, signal reconstruction and a data fusion

, time (e.g., wasting time due to errors, the need to get used to a new system, etc.), financial security (e.g., losing money, potential frauds, other financial risks) and

Overall, results suggested that fatigue affects raters’ frequency of comments on grammar, choice of words, and organization, and that raters’ comments on

Health, Environmental, Performance Health Impact Assessment 1993 - 2000 Merseyside Integrated Travel Study Follow-up Assessment Years Strategy.. Aim: to explore a potential of

In- terestingly, subgroup analysis of patients with a tumor thickness of 1.5-4.0 mm revealed a significant survival benefit from adjuvant interferon treatment regarding