Modérateur : Groupe des modérateurs
Code : Tout sélectionner
Position Tranche.Age Sexe Mt.remboursé.RC.2016.Classe
1 0 80 ans ou plus 1 Faible
2 0 80 ans ou plus 1 Faible
3 0 80 ans ou plus 1 Faible
4 0 80 ans ou plus 1 Faible
5 0 80 ans ou plus 1 Faible
6 0 80 ans ou plus 1 Faible
Appel.Cotisation.signé.2016.Classe Charge fit se.fit residual.scale
1 Faible 0 0.1896933 0.007941483 1
2 Faible 0 0.1896933 0.007941483 1
3 Faible 0 0.1896933 0.007941483 1
4 Faible 0 0.1896933 0.007941483 1
5 Faible 0 0.1896933 0.007941483 1
6 Faible 0 0.1896933 0.007941483 1
IClower ICupper PredictedProb
1 0.2052586 0.174128 0.1896933
2 0.2052586 0.174128 0.1896933
3 0.2052586 0.174128 0.1896933
4 0.2052586 0.174128 0.1896933
5 0.2052586 0.174128 0.1896933
6 0.2052586 0.174128 0.1896933
Code : Tout sélectionner
Pred1 <- structure(list(Position = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("0",
"1"), class = "factor"), Tranche.Age = structure(c(1L, 1L, 1L,
1L, 1L, 1L), .Label = c("80 ans ou plus", "Entre 0 et 19", "Entre 20 et 39",
"Entre 40 et 59 ans", "Entre 60 et 79 ans"), class = "factor"),
Sexe = c(1L, 1L, 1L, 1L, 1L, 1L), Mt.remboursé.RC.2016.Classe = structure(c(2L,
2L, 2L, 2L, 2L, 2L), .Label = c("Elevé", "Faible"), class = "factor"),
Appel.Cotisation.signé.2016.Classe = structure(c(4L, 4L,
4L, 4L, 4L, 4L), .Label = c("Assez élevé", "Assez faible",
"Elevé", "Faible"), class = "factor"), Charge = c(0L, 0L,
0L, 0L, 0L, 0L), fit = c(0.189693319557024, 0.189693319557024,
0.189693319557024, 0.189693319557024, 0.189693319557024,
0.189693319557024), se.fit = c(0.00794148332983344, 0.00794148332983344,
0.00794148332983344, 0.00794148332983344, 0.00794148332983344,
0.00794148332983344), residual.scale = c(1, 1, 1, 1, 1, 1
), IClower = c(0.205258626883497, 0.205258626883497, 0.205258626883497,
0.205258626883497, 0.205258626883497, 0.205258626883497),
ICupper = c(0.17412801223055, 0.17412801223055, 0.17412801223055,
0.17412801223055, 0.17412801223055, 0.17412801223055), PredictedProb = c(0.189693319557024,
0.189693319557024, 0.189693319557024, 0.189693319557024,
0.189693319557024, 0.189693319557024)), .Names = c("Position",
"Tranche.Age", "Sexe", "Mt.remboursé.RC.2016.Classe", "Appel.Cotisation.signé.2016.Classe",
"Charge", "fit", "se.fit", "residual.scale", "IClower", "ICupper",
"PredictedProb"), row.names = c("1", "2", "3", "4", "5", "6"), class = "data.frame")
Code : Tout sélectionner
library(ggplot2)
ggplot(Pred) +
geom_bar(
aes(x = fit.d, fill = Position),
stat = "count",
position = "dodge"
)
Code : Tout sélectionner
MeanScore <- tapply(Pred$fit, fit.d, mean)
Code : Tout sélectionner
tapply(positif, intervalle, function(x) mean(x == "1"))
Code : Tout sélectionner
p <- ggplot(data=Diagramme, aes(x = MeanScore, y = Proportiondes1)) + geom_point()
print(p)
Code : Tout sélectionner
ggplot(data = Diagramme, aes(x = MeanScore, y = Proportiondes1)) +
geom_point(shape = 18, size = 4) +
geom_line(linetype = "dotted", colour = "blue")
Retourner vers « Questions en cours »
Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 1 invité