recod: Recoding of the data matrices

Description Usage Arguments Value

View source: R/recod.R

Description

Recoding of the quantitative and of the qualitative data matrix.

Usage

1
  recod(X.quanti, X.quali,rename.level=FALSE)

Arguments

X.quanti

a numerical data matrix.

X.quali

a categorical data matrix.

rename.level

boolean, if TRUE all the levels of the qualitative variables are renamed as follows: "variable_name=level_name".

Value

X

X.quanti and X.quali concatenated in a single matrix.

Y

X.quanti with missing values replaced with mean values concatenated with the indicator matrix of X.quali with missing values replaced by zeros.

Z

X.quanti standardized (centered and reduced by standard deviations) concatenated with the indicator matrix of X.quali centered and reduced with the square roots of the relative frequencies of the categories.

W

X.quanti standardized (centered and reduced by standard deviations) concatenated with the indicator matrix of X.quali centered.

n

the number of observations.

p

the total number of variables

p1

the number of quantitative variables

p2

the number of qualitative variables

g

the means of the columns of Y

s

the standard deviations of the columns of Y

G

The indicator matix of X.quali with missing values replaced by 0

Gcod

The indicator matix G reduced with the square roots of the relative frequencies of the categories


PCAmixdata documentation built on Nov. 17, 2017, 7:38 a.m.