Docsity

Catpca - Mathematics and Statistics - Study Notes, Study notes of Mathematical Statistics

Toggle sidebar
bg1
1
CATPCA
The CATPCA procedure quantifies categorical variables using optimal scaling,
resulting in optimal principal components for the transformed variables. The
variables can be given mixed optimal scaling levels and no distributional
assumptions about the variables are made.
In CATPCA, dimensions correspond to components (that is, an analysis with two
dimensions results in two components), and object scores correspond to component
scores.
Notation
The following notation is used throughout this chapter unless otherwise stated:
n
Number of analysis cases (objects)
w
n
Weighted number of analysis cases:
1
n
i
i
w
=
∑
t
o
t
n
Total number of cases (analysis + supplementary)
i
w
Weight of object
;
1
i
w
=
if cases are unweighted;
0
i
w= if object
is
supplementary.
W
Diagonal
t
ot to
t
n
n× matrix, with
i
w
on the diagonal.
m
Number of analysis variables
w
m
Weighted number of analysis variables (
1
m
wj
j
m
v
=
=∑)
t
o
t
m
Total number of variables (analysis + supplementary)
1
m
Number of analysis variables with multiple nominal scaling level.
2
m
Number of analysis variables with non-multiple scaling level.
w
m
Weighted number of analysis variables with multiple nominal scaling level.
2
w
m
Weighted number of analysis variables with non-multiple scaling level.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Catpca - Mathematics and Statistics - Study Notes and more Study notes Mathematical Statistics in PDF only on Docsity!

CATPCA

The CATPCA procedure quantifies categorical variables using optimal scaling, resulting in optimal principal components for the transformed variables. The variables can be given mixed optimal scaling levels and no distributional assumptions about the variables are made. In CATPCA, dimensions correspond to components (that is, an analysis with two dimensions results in two components), and object scores correspond to component scores.

Notation

The following notation is used throughout this chapter unless otherwise stated:

n (^) Number of analysis cases (objects)

n w Weighted number of analysis cases: 1

n i i

w

n t (^) ot Total number of cases (analysis + supplementary)

w i Weight of object i ; wi = 1 if cases are unweighted; wi = 0 if object i is supplementary. W (^) Diagonal nt (^) ot × ntot matrix, with wi on the diagonal. m (^) Number of analysis variables

m w Weighted number of analysis variables ( 1

m w j j

m v

m t (^) ot Total number of variables (analysis + supplementary)

m 1 Number of analysis variables with multiple nominal scaling level.

m 2 Number of analysis variables with non-multiple scaling level.

mw (^) 1 Weighted number of analysis variables with multiple nominal scaling level.

mw (^) 2 Weighted number of analysis variables with non-multiple scaling level.

J Index set recording which variables have multiple nominal scaling level. H The data matrix (category indicators), of order nt (^) ot × mtot , after discretization, imputation of missings , and listwise deletion, if applicable. p (^) Number of dimensions

For variable j , j =1, !, mtot

v (^) j variable weight; v (^) j = 1 if weight for variable j is not specified or if variable j is supplementary

k (^) j Number of categories of variable^ j^ (number of distinct values in h (^) j , thus, including supplementary objects)

G (^) j Indicator matrix for variable j , of order nt (^) ot × kj

The elements of G (^) j are defined as i = 1,! , nt (^) ot ; r =1, !, kj

1 when the th object is in the th category of variable j ir 0 when the th object is not in the th category of variable

i r j g i r j

D (^) j Diagonal k (^) j × kj matrix, containing the weighted univariate marginals; i.e., the weighted column sums of G (^) j ( D (^) j = G WG ′ j (^) j )

M (^) j Diagonal nt (^) ot × ntot matrix, with diagonal elements defined as

0 when the th observation is missing and missing strategy variable is passive

when the th object is in th category of variable and th category is only 0 used by supplementary objects (i.e. wh

j ii

i j

m = i r j r en (^) ( ) 0) otherwise

j rr j

d v

M * (^) j j ∑ M

Discretization

Discretization is done on the unweighted data.

Multiplying

First, the original variable is standardized. Then the standardized values are multiplied by 10 and rounded, and a value is added such that the lowest value is 1.

Ranking

The original variable is ranked in ascending order, according to the alphanumerical value.

Grouping into a specified number of categories with a normal distribution

First, the original variable is standardized. Then cases are assigned to categories using intervals as defined in Max (1960).

Grouping into a specified number of categories with a uniform distribution

First the target frequency is computed as n divided by the number of specified categories, rounded. Then the original categories are assigned to grouped categories such that the frequencies of the grouped categories are as close to the target frequency as possible.

Grouping equal intervals of specified size

First the intervals are defined as lowest value + interval size, lowest value + 2*interval size, etc. Then cases with values in the k thinterval are assigned to category k.

Imputation of Missing Values

When there are variables with missing values specified to be treated as active (impute mode or extra category), then first the k (^) j ’s for these variables are computed before listwise deletion. Next the category indicator with the highest weighted frequency (mode; the smallest if multiple modes exist), or k (^) j + 1 (extra

category) is imputed. Then listwise deletion is applied if applicable. And then the k (^) j ’s are adjusted.

If an extra category is imputed for a variable with optimal scaling level Spline Nominal, Spline Ordinal, Ordinal or Numerical, the extra category is not included in the restriction according to the scaling level in the final phase (see step (2) Objective Function Optimization section).

Configuration

CATPCA can read a configuration from a file, to be used as the initial configuration or as a fixed configuration in which to fit variables. For an initial configuration see step 1 in the Optimization section. A fixed configuration X is centered and orthonormalized as described in the optimization section in step 3 (with X in stead of Z ) and step 4 (except for the factor n 1 2 w ), and the result is postmultiplied with 1 2^ (this leaves the configuration unchanged if it is already centered and orthogonal). The analysis variables are set to supplementary and variable weights are set to one. Then CATPCA proceeds as described in the Supplementary Variables section.

Objective Function Optimization

Objective Function

The CATPCA objective is to find object scores X and a set of Y (^) j (for j = 1, !, m )  the underlining indicates that they may be restricted in various ways  so that the function

( ) (^) ( ) ( ) ; 1 1 tr w j (^) j j j j j

σ n −^ c −^

X Y (^) ∑ X G Y M W X G Y , with

c is p if (^) j ∈ J and c is 1 if (^) j ∉ J ,

is minimal, under the normalization restriction X M WX ′ (^) ∗ = n mw w I ( I is the p × p identity matrix). The inclusion of M (^) j in σ ( X Y ; ) ensures that there is no influence of passive missing values (missing values in variables that have missing option passive, or missing option not specified ). M ∗ contains the number of active

Optimization

Optimization is achieved by executing the following iteration scheme:

  1. Initialization I or II
  2. Update category quantifications
  3. Update object scores
  4. Orthonormalization
  5. Convergence test: repeat (2)(4) or continue
  6. Rotation and reflection The first time (for the initial configuration) initialization I is used and variables that do not have optimal scaling level Multiple Nominal or Numerical are temporarily treated as numerical, the second time (for the final configuration) initialization II is used. Steps (1) through (6) are explained below.

(1) Initialization I. If an initial configuration is not specified, the object scores X are initialized with random numbers. Then X is orthonormalized (see step 4) so that u M WX ′^ ∗ = 0 and X M WX ′^ ∗ = n mw w I , yielding (^) w X^ +. The initial component loadings are computed as the cross products of X (^) w^ + and the centered original variables (^) ( I − M uu W j ′^ ( u M Wu ′ j )) h (^) j , rescaled to unit length.

II. All relevant quantities are copied from the results of the first cycle.

(2) Update category quantifications; loop across variables j = 1, …, m ( variables 1, …, m are analysis variables):

With fixed current values X (^) w^ + the unconstrained update of Y (^) j is

Y^ ^ (^) j = D^ − (^) j^1 G X ′ j w +

Multiple nominal: Y j +^ =  Y^ (^) j.

For non-multiple scaling levels first an unconstrained update is computed in the same way:

Y^ ^ (^) j^1 j j w

= D^ −^ G X ′ +

next one cycle of an ALS algorithm (De Leeuw et al., 1976) is executed for

computing a rank-one decomposition of  Y^ (^) j , with restrictions on the left-hand

vector, resulting in

y  (^) j = Y a  j j

Nominal: y * (^) j = y  (^) j.

For the next four optimal scaling levels, if variable j was imputed with an extra

category, y * (^) j is inclusive category k (^) j in the initial phase, and is exclusive category

k (^) j in the final phase.

Spline nominal and spline ordinal: y * (^) j = d (^) j + S b j j.

The spline transformation is computed as a weighted regression (with weights the

diagonal elements of D (^) j ) of  y^ (^) j on the I-spline basis S (^) j. For the spline ordinal

scaling level the elements of b (^) j are restricted to be nonnegative, which makes y * j

monotonically increasing

Ordinal: y * (^) j ← WMON ( y ^ (^) j ).

The notation WMON ( ) is used to denote the weighted monotonic regression

process, which makes y * (^) j monotonically increasing. The weights used are the

diagonal elements of D (^) j and the subalgorithm used is the up-and-down-blocks

minimum violators algorithm (Kruskal, 1964; Barlow et al., 1972).

Numerical: y * (^) j ← WLIN ( y ^ (^) j ).

The notation WLIN ( ) is used to denote the weighted linear regression process. The weights used are the diagonal elements of D (^) j.

Next y * j is normalized (if variable (^) j was imputed with an extra category, y * (^) j is

inclusive category k (^) j from here on):

y j

nw (^) j j j j = y y ′ D y −

Then we update the component loadings:

a j

  • (^1)  j nw j j = −^ Y ′ D y +

Finally, we set Y + j^ = y a^ + j^ ′ (^) j +.

(6) Rotation and reflection

To achieve principal axes orientation, X + is rotated with the matrix L. In addition the s thcolumn of X + is reflected if for dimension s the mean of squared loadings with a negative sign is higher than the mean of squared loadings with a positive sign. Then step (2) is executed, yielding the rotated and possibly reflected quantifications and loadings.

Supplementary Objects

To compute the object scores for supplementary objects, after convergence steps (2) and (3) are repeated, with the zero’s in W temporarily set to ones in computing Z and X +. If a supplementary object has missing values, passive treatment is applied.

Supplementary Variables

The quantifications for supplementary variables are computed after convergence. For supplementary variables with multiple nominal scaling level step (2) is executed once. For non-multiple supplementary variables, an initial a (^) j is computed as in step (1). Then the rank-one and restriction substeps of step (2) are repeated as long as the difference between consecutive values of a a ′ j (^) j exceeds .00001, with a maximum of 100 iterations.

Diagnostics

Maximum Rank (may be issued as a warning when exceeded)

The maximum rank p max indicates the maximum number of dimensions that can be computed for any data set. In general

max min^ 1,^ j 1 2 j J

p n ∑ k m m ∈

 ^  

if there are variables with optimal scaling level multiple nominal without missing values to be treated as passive. If variables with optimal scaling level multiple nominal do have missing values to be treated as passive, the maximum rank is

max min^ 1,^ j max(^3 ,1) 2 j J

p n ∑ k m m ∈

with m 3 the number of variables with optimal scaling level multiple nominal without missing values to be treated as passive. Here k (^) j is exclusive supplementary objects (that is, a category only used by supplementary objects is not counted in computing the maximum rank). Although the number of nontrivial dimensions may be less than p max when m = 2 , CATPCA does allow dimensionalities all the way up to p max. When, due to empty categories in the actual data, the rank detoriates below the specified dimensionality, the program stops.

Descriptives

The descriptives tables gives the weighted univariate marginals and the weighted number of missing values (system missing, user defined missing, and values ≤ 0 ) for each variable.

Fit and Loss Measures

When the HISTORY option is in effect, the following fit and loss measures are reported: (a) Total fit (VAF). This is the quantity TFIT as defined in step (5).

(b) Total loss. This is σ (^) ( X Y ; (^) ), computed as the sum of multiple loss and single loss defined below. (c) Multiple loss. This measure is computed as

1 1 TMLOSS ( (^) w 1 w 2 ) ( (^) w ) (^) j tr( (^) j j j ) (^) w j tr( (^) j j j ) j J j J

m pm n p −^ v n − v ∈ ∉

= + − ^ ′ + ′ 

∑ Y D Y^ ∑ Y D Y

(d) Single loss. This measure is computed only when some of the variables are single:

SLOSS 1 tr( ) w j j j j j j j j J j J

n − v v ∉ ∉

= (^) ∑ Y D Y ′ −∑ a a ′

The Total Variance Accounted For for multiple nominal variables is the mean over dimensions, and for non-multiple variables the sum over dimensions. So, the total eigenvalue is

1 2 1 s

tr( )= VAF1 + s VAF2 s s

p −∑ ∑.

If there are no passive missing values, the eigenvalues 1 2^ are those of the correlation matrix (see the Correlations and Eigenvalues section) weighted with variable weights: w r jj = v rj jj , and w w 1 2 r jl = rlj = v (^) j rjl

If there are passive missing values, then the eigenvalues are those of the matrix 1 mw (^) c * c Q M ′ − Q , with

Q c (^) = nw −1 2^ ( I − M uu W * ′^ /( u M Wu ′ * ) ) Q ,

(for Q see the Correlations and Eigenvalues section) which is not necessarily a correlation matrix, although it is positive semi-definite. This matrix is weighted with variable weights in the same way as R.

Variance Accounted For

The Variance Accounted For table gives the VAF per dimension and per variable for centroid coordinates, and for non-multiple variables also for vector coordinates (see quantification section):

Centroid Coordinates

VAF (^) js = v (^) j tr( Y (^) js ′ D Y j js ).

Vector Coordinates

VAF^2 js =^ v aj js , for^ j^ ∉^ J.

Correlations and Eigenvalues

Before transformation

1 nw c c R = −^ H WH ′ , with H c weighted centered and normalized H.

For the eigenvalue decomposition of R (to compute the eigenvalues), first row j and column j and are removed from R if j is a supplementary variable, and then

r ij is multiplied by (^) ( )

1 2 v v i j.

If passive missing treatment is applicable for a variable, missing values are imputed with the variable mode, regardless of the passive imputation specification.

After transformation

When all analysis variables are non-multiple, and there are no missing values, specified to be treated as passive, the correlation matrix is: 1 n w R = −^ Q WQ ′ , with q (^) j = G y j j.

The first p eigenvalues of R equal 1 2^. (See also Optimization step (5) and Model Summary for interpretation of 1 2^ ). When there are multiple nominal variables in the analysis, p correlation matrices are computed ( s = 1, …, p ):

1 ( ) s nw ( ) s ( ) s

R = −^ Q ′ WQ ,

with q ( ) (^) s j = G y j (^) j for non-multiple variables

and (^) ( ) 1 2 1 2 ( ) s j nw^ j ( j s ) ( ) j s j ( ) j s

− q = G Y Y ′ D Y for multiple nominal variables.

Usually, for the higher eigenvalues, the first eigenvalue of R ( ) (^) s is equal to λ1 2 s

(see Model Summary section). The lower values of 1 2^ are in most cases the second or subsequent eigenvalues of R ( ) (^) s.

If there are missing values, specified to be treated as passive, the mode of the quantified variable or the quantification of an extra category (as specified in syntax; if not specified, default (mode) is used) is imputed before computing correlations. Then the eigenvalues of the correlation matrix do not equal 1 2^ (see Model Summary section). The quantification of an extra category for multiple nominal variables is computed as

Y ( ) j (^) ( (^) k (^) j +1) s

1

i i is i I i I

w w x

−

∈ ∈

= ^ 

∑ ∑ ,

During the optimization phase, variable principal normalization is used. Then, after convergence X = n 1 2 w^ W −1 2 K (^) p and A = V^ − 1 2^ L (^) p 1 4.

If variable principal normalization is requested, X n^ = X and A n^ = A , else X n^ = X a^4 A^ n^ = A 1 4(^ b −1) with a = (1 + q ) / 2, b = (1 − q ) / 2, and q any real value in the closed interval [-1,1], except for independent normalization: then there is no q value and a = b = 1. q = − 1 is equal to variable principal normalization,^ q = 1 is equal to object principal normalization, q = 0 is equal to symmetrical normalization.

When there are multiple nominal variables in the analysis, there are p matrices Q ( ) (^) s , s = 1, …, p (see the Correlations and Eigenvalues section). Then one of the

singular values of nw −1 2^ W 1 2^ Q ( ) (^) s V 1 2 equals 1 4 s.

If a variable has multiple nominal scaling level, the normalization factor is reflected in the centroids: Y n j^ = Y j (^) 1 4(^ b −1).

Quantifications

For variables with non-multiple scaling level the quantifications y (^) j are displayed,

the vector coordinates y (^) j ( a n j )′, and the centroid coordinates: Y (^) j with variable

principal normalization, D^ − (^) j^1 G WX^ ′ j nwith one of the other normalization options.

For multiple nominal variables the quantifications are the centroid coordinates Y n j.

If a category is only used by supplementary objects (i.e. treated as a passive missing), only centroid coordinates are displayed for this category, computed as 1 2 1 n ( ) j r w jr i i I

n n − ∈

y = (^) ∑ x , for variables with non-multiple scaling level and

1 2 1 1 4( 1) ( )

b j r w jr i i I

n n −^ − ∈

y = (^) ∑ x , for variables with multiple nominal scaling level.

where y ( ) (^) j r is the r throw of Y (^) j , n (^) jr is the number of objects that have category r , and I is an index set recording which objects are in category r.

Residuals

For non-multiple variables, Residuals gives a plot of the quantified variable j ( G y j (^) j ) against the approximation, Xa (^) j. For multiple nominal variables plots per

dimension are produced of G y j n( ) (^) j s against the approximation x n s.

Projected Centroids

The projected centroids of variable l on variable j , j ∉ J ,are

( )1 2 l j j j Y a a a ′ −

Scaling factor Biplot, triplot, and loading plot

In plots including both the object scores or centroids and loadings (loading plot including centroids, biplot with objects and loadings, and triplot with objects, centroids and loadings), the object scores and centroids are rescaled using the following scaling factor:

n n 1 1 n n n n 1 1 1

2 max( ,..., ) Scalefactor min( ,..., ) (max( ,..., )

p s ms s p s ns s ns s

a a

x x x x

=

=

∑

∑

References

Barlow, R. E., Bartholomew, D. J., Bremner, J. M., and Brunk, H. D. 1972. Statistical inference under order restrictions. New York: John Wiley & Sons, Inc.

Cliff, N. 1966. Orthogonal rotation to congruence. Psychometrika , 31: 33–42.

De Leeuw, J., Young, F. W., and Takane, Y. 1976. Additive structure in qualitative data: an alternating least squares method with optimal scaling features. Psychometrika , 31: 33–42.