Information Technology Reference
In-Depth Information
Value
The output of
ca.predictions.mat
is a matrix of similar size than
Pmat
containing
the row profile predictions.
Details
If the input of
ca.predictions.mat
is not in the form of a correspondence matrix
but instead a matrix with nonnegative elements, the relationship between the output of
ca.predictions.mat
and the output of the function
cabipl
can be determined from
the following examples:
•
ca.predictions.mat(Pmat, e.vects = 1:2)
outputs the same predictions
as
cabipl with e.vects = 1
;
•
ca.predictions.mat(Pmat, e.vects = 1:3)
outputs the same predictions
as
cabipl with e.vects = 1:2
;
•
ca.predictions.mat(Pmat, e.vects = 1:4)
outputs the same predictions
as
cabipl with e.vects = 1:3
;
•
ca.predictions.mat(Pmat, e.vects = c(1, 2, 4))
outputs
the
same
predictions as
cabipl with e.vects = c(1,3)
.
7.5.4 Functions
indicatormat
,
construct.df
,
Chisq.dist
The functions
indicatormat
,
construct.df
and
Chisq.dist
are useful when per-
forming a CA.
The function
indicatormat
calculates the indicator matrix associated with a two-
way table of frequencies. It takes only the one argument,
table
, a two-way table of
frequencies in the form of a
p
q
matrix. The output of
indicatormat
is the indicator
matrix associated with the input
p
×
q
matrix of frequencies. This function must not be
confused with the function
indmat
that returns the indicator matrix associated with its
argument, a grouping vector.
The function
construct.df
is useful when a data set is in a similar form to our data
set
RSACrime.data
, that is, a list of matrices each representing a contingency table.
Given such a data set as its argument,
construct.df
extracts any required element of
the list in the form of a dataframe. It takes the following arguments:
×
A list with elements forming a complete data set.
dat.list
Elements of the list to extract in the form of dataframes.
year
The output of
construct.df
is a dataframe corresponding to a specified element of a
list containing an entire data set.
The function
Chisq.dist
calculates the chi-squared distances as well as ordi-
nary Euclidean distances between the rows of a matrix. It takes as its only argument