This function allows you to calculate the level of school completion

level_completion(
  data = ech::toy_ech_2018,
  e197 = "e197",
  e197_1 = "e197_1",
  e201 = "e201",
  e51_4 = "e51_4",
  e51_5 = "e51_5",
  e51_6 = "e51_6"
)

Arguments

data

data.frame

e197

Variable name of attends primary school

e197_1

Variable name of completed primary

e201

Variable name of attends secondary

e51_4

Variable name of years passed in lower secondary

e51_5

Variable name of years passed in upper secondary

e51_6

Variable name of years passed in technical upper secondary

Value

data.frame

Details

Disclaimer: This script is not an official INE product. Aviso: El script no es un producto oficial de INE.

Examples

# \donttest{ toy_ech_2018 <- level_completion(data = ech::toy_ech_2018)
#> Variables have been created: #> primary_completion (primaria completa); #> lower_secondary_completion (ciclo basico completo) & #> upper_secondary_completion (bachillerato completo)
# }