Cálculo de análisis de componentes principales en base a las 4 vatriables principales del ISMT. La función asume que la base de datos ha pasado por precalc(), ya que requiere los puntajes normalizados por variable. || || Calculation of principal components analysis based on the 4 main variables of ISMT. Assumes the database has been through precalc(), as it rqeuires the normalized scores by variable.
get_pca(
df,
esc = "ptje_esc",
hacin = "ptje_hacin",
mat = "ptje_mater",
alleg = "ptje_alleg"
)objeto data.frame con el cálculo de componentes principales. || || data.frame object with the principal components analysis calculation.
objeto data.frame con la informaión de puntajes normalizados. || || data.frame object with the normalized scores.
string. Nombre de la variable con el puntaje de escolaridad del jefe de hogar. Default is ptje_esc || || string. Name of the field with the scholarship score for the home head. Default is ptje_esc.
string. Nombre del campo con el puntaje de hacinamiento. Default es ptje_hacin. || || string. Name of the field with the overcrowding score. Default is ptje_hacin.
string. Nombre del campo con el puntaje de materialidad de la vivienda. Default es ptje_mater. || || string. Name of the field with the dwelling material score. Default is ptje_mater.
string. Nombre del campo con el puntaje de allegamiento. Default is ptje_alleg. || || string. Name of the field with the relative crowding score. Default is ptje_alleg.
data(c17_example)
clean <- c17_example |> literalize(2017) |> cleanup() |> precalc() |> get_pca()
Run the code above in your browser using DataLab