get_pca {ismtchile}R Documentation

Calcular análisis de componentes principales – Calculate Principal Components Analysis

Description

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.

Usage

get_pca(
  df,
  esc = "ptje_esc",
  hacin = "ptje_hacin",
  mat = "ptje_mater",
  alleg = "ptje_alleg"
)

Arguments

df

objeto data.frame con la informaión de puntajes normalizados. || || data.frame object with the normalized scores.

esc

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.

hacin

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.

mat

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.

alleg

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.

Value

objeto data.frame con el cálculo de componentes principales. || || data.frame object with the principal components analysis calculation.

Examples

 data(c17_example)
 clean <- c17_example |> literalize(2017) |> cleanup() |> precalc() |> get_pca()

[Package ismtchile version 2.1.5 Index]