pivotCoord

pivotCoord transforms into Pivot coordinates as a special case of isometric logratio coordinates

Syntax

Description

Pivot coordinates map D-part compositional data from the simplex into a (D-1)-dimensional real space isometrically. From our choice of pivot coordinates, all the relative information about one of parts (or about two parts) is aggregated in the first coordinate (or in the first two coordinates in case of symmetric pivot coordinates, respectively).

example

Xilr =pivotCoord(X) Call to pivotCoord with all the default options.

example

Xilr =pivotCoord(X, Name, Value) Call to pivotCoord with options.

Examples

expand all

  • Call to pivotCoord with all the default options.
  • First variable as pivot variable

    X=rand(100,5);
    Xilr=pivotCoord(X);

  • Call to pivotCoord with options.
  • Third variable as pivot variable

    X=rand(100,5);
    Xilr=pivotCoord(X,'pivotvar',3);

    Related Examples

    expand all

  • Call to pivotCoord with option norm.
  • Third variable as pivot variable and no nnormalizing constant

    X=rand(100,5);
    Xilr=pivotCoord(X,'pivotvar',3,'norm',false);

  • Call to pivotCoord with option sympivotcoord.
  • X=rand(100,5);
    % In this case the output is 100-by-2
    Xilr=pivotCoord(X,'sympivotcoord',true);

  • Call to pivotCoord with input a table.
  • load car
    Xt=car(:,2:6);
    % In this case the rowNames are those of the original input table
    % The variable names are z1, ..., z4
    Xilr=pivotCoord(Xt);
    head(Xilr)
                        z1           z2           z3           z4     
                     _________    _________    ________    ___________
    
        Acura          0.31164     0.049701     -0.3418       -0.11618
        Audi           0.31677      0.40894    -0.14155       -0.89113
        Bentley       -0.11448    -0.011784     0.38567       -0.77684
        BMW            0.21344      0.41926    -0.06349       -0.63287
        Buick        -0.031682     -0.28066    0.089161    -1.5701e-16
        Cadillac       0.18143     -0.20276     0.22607       -0.51616
        Chevrolet     -0.43497       0.2162       0.123      -0.094421
        Chrysler      -0.10722      0.31187    -0.26362       -0.45661
    
    

    Input Arguments

    expand all

    X — Input data. Matrix or table.

    Matrix or table containing non negative values

    Data Types: single| double

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: 'norm',false , 'pivotvar',1 , 'sympivotcoord',true

    norm —the normalizing constant.boolean.

    If norm is true (default) sqrt((D-i)/(D-i+1)) is used else norm is set equal to 1.

    This option takes effect just if sympivotcoord is false

    Example: 'norm',false

    Data Types: logical

    pivotvar —pivotal variable.positive integer between 1 and D.

    If any other number than 1, the data are resorted in that sense that the pivotvar is shifted to the first part.

    Example: 'pivotvar',1

    Data Types: scalar

    sympivotcoord —symmetric pivot coordinate.boolean.

    As default symmetric pivot coordinates are not used.

    If sympivotcoord is true the output matrix is of size n-by-2 else it is of size n-by-(D-1).

    Example: 'sympivotcoord',true

    Data Types: logical

    Output Arguments

    expand all

    Xilr —The data represented in pivot coordinates. Array of table

    Xilr is a matrix (or table depending on the input) which is of size n-by-2, if sympivotcoord is true or n-by-(D-1) if sympivotcoord is false.

    References

    Filzmoser, P., Hron, K. and Templ, M. (2018), "Applied Compositional Data Analysis". Springer, Cham.

    Atkinson, A.C., Riani,M., Corbellini,A., Perrotta D., and Todorov,V. (2024), Applied Robust Statistics through the Monitoring Approach, Heidelberg: Springer Nature.

    See Also

    This page has been automatically generated by our routine publishFS