Functions we need to construct indices

make_idx(
  data,
  vars,
  sgn = 1,
  scale = FALSE,
  seed = 12345,
  diplaymessage = "FALSE"
)

Arguments

data

Given dataset containing variables

vars

variable used construct a composite index from the first principal component after multiple imputation.

sgn

Direction - Set sgn=-1 to reverse the direction of the index.

scale

Scale - Set scale=TRUE to use scaling during the PCA calculation

seed

for reproducibility

diplaymessage

diplay message TRUE OR FALSE

Examples

if (FALSE) { }