Analyse des données sur la santé mentale en prison

Description des données :

names(smp)
##  [1] "age"          "prof"         "duree"        "discip"      
##  [5] "n.enfant"     "n.fratrie"    "ecole"        "separation"  
##  [9] "juge.enfant"  "place"        "abus"         "grav.cons"   
## [13] "dep.cons"     "ago.cons"     "ptsd.cons"    "alc.cons"    
## [17] "subst.cons"   "scz.cons"     "char"         "rs"          
## [21] "ed"           "dr"           "suicide.s"    "suicide.hr"  
## [25] "suicide.past" "dur.interv"
## str(smp)
summary(smp)
##       age                       prof         duree         discip     
##  Min.   :19.0   ouvrier           :227   Min.   :1.0   Min.   :0.000  
##  1st Qu.:28.0   sans emploi       :222   1st Qu.:4.0   1st Qu.:0.000  
##  Median :37.0   employe           :135   Median :5.0   Median :0.000  
##  Mean   :38.9   artisan           : 90   Mean   :4.3   Mean   :0.232  
##  3rd Qu.:48.0   prof.intermediaire: 58   3rd Qu.:5.0   3rd Qu.:0.000  
##  Max.   :83.0   (Other)           : 61   Max.   :5.0   Max.   :1.000  
##  NA's   :2      NA's              :  6   NA's   :223   NA's   :6      
##     n.enfant       n.fratrie         ecole        separation   
##  Min.   : 0.00   Min.   : 0.00   Min.   :1.00   Min.   :0.000  
##  1st Qu.: 0.00   1st Qu.: 2.00   1st Qu.:1.00   1st Qu.:0.000  
##  Median : 1.00   Median : 3.00   Median :2.00   Median :0.000  
##  Mean   : 1.75   Mean   : 4.29   Mean   :1.87   Mean   :0.423  
##  3rd Qu.: 3.00   3rd Qu.: 6.00   3rd Qu.:2.00   3rd Qu.:1.000  
##  Max.   :13.00   Max.   :21.00   Max.   :5.00   Max.   :1.000  
##  NA's   :26                      NA's   :5      NA's   :11     
##   juge.enfant        place            abus         grav.cons   
##  Min.   :0.000   Min.   :0.000   Min.   :0.000   Min.   :1.00  
##  1st Qu.:0.000   1st Qu.:0.000   1st Qu.:0.000   1st Qu.:2.00  
##  Median :0.000   Median :0.000   Median :0.000   Median :4.00  
##  Mean   :0.277   Mean   :0.229   Mean   :0.278   Mean   :3.64  
##  3rd Qu.:1.000   3rd Qu.:0.000   3rd Qu.:1.000   3rd Qu.:5.00  
##  Max.   :1.000   Max.   :1.000   Max.   :1.000   Max.   :7.00  
##  NA's   :5       NA's   :7       NA's   :7       NA's   :4     
##     dep.cons        ago.cons       ptsd.cons        alc.cons    
##  Min.   :0.000   Min.   :0.000   Min.   :0.000   Min.   :0.000  
##  1st Qu.:0.000   1st Qu.:0.000   1st Qu.:0.000   1st Qu.:0.000  
##  Median :0.000   Median :0.000   Median :0.000   Median :0.000  
##  Mean   :0.397   Mean   :0.167   Mean   :0.216   Mean   :0.186  
##  3rd Qu.:1.000   3rd Qu.:0.000   3rd Qu.:0.000   3rd Qu.:0.000  
##  Max.   :1.000   Max.   :1.000   Max.   :1.000   Max.   :1.000  
##                                                                 
##    subst.cons       scz.cons           char            rs      
##  Min.   :0.000   Min.   :0.0000   Min.   :1.00   Min.   :1.00  
##  1st Qu.:0.000   1st Qu.:0.0000   1st Qu.:1.00   1st Qu.:1.00  
##  Median :0.000   Median :0.0000   Median :1.00   Median :2.00  
##  Mean   :0.265   Mean   :0.0826   Mean   :1.51   Mean   :2.06  
##  3rd Qu.:1.000   3rd Qu.:0.0000   3rd Qu.:2.00   3rd Qu.:3.00  
##  Max.   :1.000   Max.   :1.0000   Max.   :4.00   Max.   :3.00  
##                                   NA's   :96     NA's   :103   
##        ed             dr         suicide.s      suicide.hr 
##  Min.   :1.00   Min.   :1.00   Min.   :0.00   Min.   :0.0  
##  1st Qu.:1.00   1st Qu.:1.00   1st Qu.:0.00   1st Qu.:0.0  
##  Median :2.00   Median :2.00   Median :0.00   Median :0.0  
##  Mean   :1.87   Mean   :2.15   Mean   :0.79   Mean   :0.2  
##  3rd Qu.:3.00   3rd Qu.:3.00   3rd Qu.:1.00   3rd Qu.:0.0  
##  Max.   :3.00   Max.   :3.00   Max.   :5.00   Max.   :1.0  
##  NA's   :107    NA's   :111    NA's   :41     NA's   :39   
##   suicide.past     dur.interv   
##  Min.   :0.000   Min.   :  0.0  
##  1st Qu.:0.000   1st Qu.: 48.0  
##  Median :0.000   Median : 60.0  
##  Mean   :0.284   Mean   : 61.9  
##  3rd Qu.:1.000   3rd Qu.: 75.0  
##  Max.   :1.000   Max.   :120.0  
##  NA's   :14      NA's   :50

Distribution des effectifs pour la variable n.enfant.

plot of chunk unnamed-chunk-4