EXECUTING CAR USING THE MATLAB COMMAND LINE

Alternatively, you may prefer to use command lines to compute correspondence analysis. So you can load your own data and use the following commands:

>> addpath lib;
>> output = canalysis(N,k,labels_x,labels_y);
>> rotation = ComputeRotation(output, k, coordinates, method, weights);
>> PrintDescriptives(output,detailed);
>> PrintCoordinates(output,k,coordinates,detailed);
>> PrintRotation(rotation,method, weights, output.labels, detailed); 
>> map(1,2,0);

where

(1) 'N' is a contingence table,

(2) 'k' is the number of dimensions to be retained.

(3) 'labels_x' and 'labels_y' store the corresponding labels,

(4) 'coordinates' is the coordinates used in the model. The admissible values are:

1 Symmetrical coordinates (biplot model)
  2 Row principal coordinates, and column standard coordinates
  3 Column principal coordinates, and row standard coordinates
  4 Row and column principal coordinates (French symmetrical model)

(5) 'method' is the rotation method to be computed. The admissible values are:

1 Orthogonal rotation of symmetrical coordinates
  2 Oblique rotation of symmetrical coordinates
  3 Orthogonal rotation of principal coordinates
  4 Orthogonal rotation of standard coordinates
  5 Oblique rotation of principal coordinates

(6) 'weights' is the weight scheme to be used in the rotation. The admissible values are:

  1 Row-wise normalization of coordinates
  2 Rescaling coordinates using masses
  3 None. No weights scheme is used.

(7) 'detailed' controls the level of detail of the report. The admissible values are:

  1 Prints all the details
  0 Prints the basic information

If you want to include some supplementary rows or columns, then you should replace this line:

>> output = canalysis(N,k,labels_x,labels_y);

for this one:

>> output = canalysis(N,k,labels_x,labels_y, Sup, labels_sup);

where

(8) 'Sup' is a structure that contains matrices 'r' and/or 'c' that are the contingence tables which contain the supplementary rows and columns.

(9) 'labels' is a structure that stores the labels for the supplementary rows and columns in strings 'r' and 'c' (for rows and columns, respectively).

Finally, function 'canalysis' can be also executed as,

>> output = canalysis(N);

In this case, the number of dimensions to retain is set to 2, and default labels for rows and columns are used.