| protection_sociale | R Documentation |
Calcule la proportion de la population couverte par au moins un regime de protection sociale (retraite, assurance maladie, allocations). ODD 1.3.1.
protection_sociale(donnees, vars_protection, poids = NULL, sous_groupes = NULL)
donnees |
data.frame – Donnees menages ou individus |
vars_protection |
named character – Vecteur nomme : type de protection -> variable 0/1. Ex: c(Retraite="retraite", Assurance_maladie="assur_maladie") |
poids |
character ou NULL – Variable de ponderation. Defaut : NULL |
sous_groupes |
character ou NULL – Variables de desagregation. Defaut : NULL |
Un tibble avec couverture par type de protection
set.seed(42)
n <- 400
individus <- data.frame(
retraite = rbinom(n, 1, 0.18),
assur_maladie = rbinom(n, 1, 0.22),
allocations = rbinom(n, 1, 0.12),
poids = runif(n, 0.8, 1.3)
)
protection_sociale(individus,
vars_protection = c(Retraite="retraite",
Assurance_maladie="assur_maladie",
Allocations="allocations"),
poids = "poids")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.