hop <- read.csv2("satisfaction_hopital.csv")
table(hop$profession)
##
## 1 2 3 4 5 6 7 8
## 1 38 124 88 69 44 22 41
mod1 <- lm(score.relation~age+sexe+score.information+amelioration.sante+amelioration.moral+profession+service, data = hop)
hist(resid(mod1), col="grey", main="verification normalite du bruit")

drop1(mod1,.~.,test="F")
## Single term deletions
##
## Model:
## score.relation ~ age + sexe + score.information + amelioration.sante +
## amelioration.moral + profession + service
## Df Sum of Sq RSS AIC F value Pr(>F)
## <none> 4731.0 823.89
## age 1 142.92 4874.0 830.49 8.4886 0.003861 **
## sexe 1 16.61 4747.6 822.90 0.9866 0.321429
## score.information 1 880.07 5611.1 871.20 52.2718 4.588e-12 ***
## amelioration.sante 1 61.83 4792.9 825.64 3.6724 0.056336 .
## amelioration.moral 1 115.38 4846.4 828.86 6.8530 0.009329 **
## profession 1 4.28 4735.3 822.15 0.2540 0.614637
## service 1 14.94 4746.0 822.80 0.8871 0.347070
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(mod1)
##
## Call:
## lm(formula = score.relation ~ age + sexe + score.information +
## amelioration.sante + amelioration.moral + profession + service,
## data = hop)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.7892 -2.1343 0.6682 2.7140 10.1691
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 20.74420 1.79158 11.579 < 2e-16 ***
## age 0.04276 0.01468 2.914 0.00386 **
## sexe -0.49000 0.49332 -0.993 0.32143
## score.information 0.27390 0.03788 7.230 4.59e-12 ***
## amelioration.sante 0.65586 0.34225 1.916 0.05634 .
## amelioration.moral 0.74913 0.28617 2.618 0.00933 **
## profession 0.07315 0.14513 0.504 0.61464
## service 0.10190 0.10819 0.942 0.34707
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.103 on 281 degrees of freedom
## (245 observations deleted due to missingness)
## Multiple R-squared: 0.2733, Adjusted R-squared: 0.2552
## F-statistic: 15.1 on 7 and 281 DF, p-value: < 2.2e-16