orthonorm: Computation of an Orthonormal Basis Matrix

Description Usage Arguments Value Author(s) References See Also Examples

Description

Computes an othonormal basis matrix to be used for the back-transformation of ilr-based data and statistics to clr-based data and statistics.

Usage

1

Arguments

p

the dimension of the p-space, the number of original variables.

Value

V

the p by (p-1) orthormal basis matrix.

Author(s)

Based on a function by Peter Filzmoser and Karel Hron

References

Filzmoser, P., Hron, K., Reimann, C. and Garrett, R., 2009. Robust factor analysis for compositional data. Computers & Geosciences, 35(9):1854-1861.

See Also

ilr, clr, gx.mva.closed, gx.robmva.closed, gx.md.gait.closed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Make test data available
data(sind.mat2open)

## Compute and display clr transformed data
prmatrix(clr(sind.mat2open))

## Compute and display ilr transformed data
sind.ilr <-ilr(sind.mat2open)
prmatrix(sind.ilr)

## Compute and display orthonormal basis matrix
## sind.mat2open is a 25 by 6 matrix (data set)
V <- orthonorm(6)
prmatrix(V)

## Back-transform ilr transformed data to clr form and display
temp <- sind.ilr %*% t(V)
dimnames(temp)[[2]] <- dimnames(sind.mat2open)[[2]]
prmatrix(temp)

## Clean-up
rm(sind.ilr)
rm(V)
rm(temp)

Example output

Loading required package: MASS
Loading required package: fastICA
  ** Are the data/parts all in the same measurement units? **
             Zn       Fe        Mn        Cd         Cu        Pb
N01 -0.30586371 5.803384 2.3151751 -4.400208 -1.5380074 -1.874480
N02 -0.37681539 5.780164 2.4445635 -4.799664 -1.3984666 -1.649781
N03 -0.30399723 5.891380 2.7717778 -4.552492 -1.5567602 -2.249907
N04 -0.16025911 5.686180 2.4787982 -4.765429 -1.3642319 -1.875058
N05 -0.17408469 5.638897 2.4113632 -4.818476 -1.2349567 -1.822743
N06 -0.42295698 5.478356 2.4441579 -4.301078 -1.4876677 -1.710811
N07 -0.47084063 5.558364 2.5439398 -4.422084 -1.4263521 -1.783027
N08 -0.33275163 5.669524 2.0924358 -4.384537 -1.5223357 -1.522336
N09  0.16061056 5.492080 2.1792519 -4.433386 -0.8622899 -2.536266
N10  0.15116054 6.293795 2.1473714 -4.818653 -1.7276103 -2.046064
N11 -0.19639101 5.992072 2.2275549 -4.546669 -1.2324829 -2.244084
N12  0.33143583 5.260578 2.0634761 -4.231175 -0.8025784 -2.621737
N13  0.84574692 4.725478 1.4304135 -4.183757  0.4214133 -3.239295
N14 -0.09382169 5.781811 2.3806137 -5.168996 -1.1318094 -1.767798
N15  1.18428523 4.473869 1.2419936 -4.010654  0.6467022 -3.536196
N16  0.96661755 4.964163 0.7479284 -4.229917  0.8330862 -3.281878
N17  0.02754589 5.724360 2.5364674 -4.759946 -1.7642136 -1.764214
N18 -0.27324645 5.683533 2.5078289 -4.973727 -1.6595408 -1.284847
N19 -0.03247004 5.841211 2.4001682 -5.225427 -1.6700788 -1.313404
N20 -0.67758914 5.698932 2.0203087 -4.174097 -1.1783644 -1.689190
N21 -0.31292086 5.672973 1.4410983 -4.342727 -0.8237465 -1.634677
N22 -0.22272375 6.119040 2.5718669 -4.811087 -1.4969008 -2.160195
N23 -0.03490901 5.370592 3.0380546 -4.516635 -1.5049024 -2.352200
N24 -0.10486605 5.674199 2.3779809 -4.604676 -1.4082727 -1.934366
N25 -0.13739817 5.974623 2.2829700 -4.519425 -1.3839306 -2.216840
  ** Are the data/parts all in the same measurement units? **
         Iso1          Iso2     Iso3        Iso4     Iso5
N01 -4.319890  0.3540206433 6.066023  2.13869092 2.053390
N02 -4.353642  0.2099299310 6.422128  1.93243549 1.807245
N03 -4.380793  0.0178922056 6.355656  2.24360539 2.464650
N04 -4.134057  0.2320173487 6.437746  1.94453327 2.054023
N05 -4.110399  0.2621305153 6.446578  1.78830131 1.996715
N06 -4.172859  0.0682116180 5.889779  2.04581210 1.874100
N07 -4.263292 -0.0001453617 6.032651  1.99340706 1.953208
N08 -4.244250  0.4702614642 5.941748  2.04242767 1.667635
N09 -3.769918  0.5283495848 6.100312  1.53119582 2.778341
N10 -4.343499  0.8778207094 6.653467  2.38904087 2.241351
N11 -4.375904  0.5472857857 6.253639  1.87975022 2.458271
N12 -3.485430  0.5981089715 5.874254  1.48354810 2.871969
N13 -2.743384  1.1065155238 5.644439  0.25317402 3.548470
N14 -4.154700  0.3783490151 6.805686  1.66069301 1.936526
N15 -2.326087  1.2958481541 5.465229  0.06768242 3.873708
N16 -2.826691  1.8105499702 5.591193 -0.19756848 3.595117
N17 -4.028256  0.2771886493 6.514881  2.36694089 1.932599
N18 -4.212079  0.1611063357 6.593137  2.14272363 1.407480
N19 -4.153320  0.4116796455 6.895061  2.16089093 1.438762
N20 -4.508881  0.4003793554 5.647623  1.69516586 1.850415
N21 -4.232666  1.0115801574 5.724235  1.28650138 1.790699
N22 -4.484304  0.3072402982 6.611077  2.15662028 2.366375
N23 -3.822266 -0.3022777329 6.328810  2.20849998 2.576706
N24 -4.086416  0.3320576066 6.281958  2.00703415 2.118992
N25 -4.321852  0.5190000310 6.258035  2.04298187 2.428426
           [,1]       [,2]       [,3]       [,4]       [,5]
[1,]  0.7071068  0.4082483  0.2886751  0.2236068  0.1825742
[2,] -0.7071068  0.4082483  0.2886751  0.2236068  0.1825742
[3,]  0.0000000 -0.8164966  0.2886751  0.2236068  0.1825742
[4,]  0.0000000  0.0000000 -0.8660254  0.2236068  0.1825742
[5,]  0.0000000  0.0000000  0.0000000 -0.8944272  0.1825742
[6,]  0.0000000  0.0000000  0.0000000  0.0000000 -0.9128709
             Zn       Fe        Mn        Cd         Cu        Pb
N01 -0.30586371 5.803384 2.3151751 -4.400208 -1.5380074 -1.874480
N02 -0.37681539 5.780164 2.4445635 -4.799664 -1.3984666 -1.649781
N03 -0.30399723 5.891380 2.7717778 -4.552492 -1.5567602 -2.249907
N04 -0.16025911 5.686180 2.4787982 -4.765429 -1.3642319 -1.875058
N05 -0.17408469 5.638897 2.4113632 -4.818476 -1.2349567 -1.822743
N06 -0.42295698 5.478356 2.4441579 -4.301078 -1.4876677 -1.710811
N07 -0.47084063 5.558364 2.5439398 -4.422084 -1.4263521 -1.783027
N08 -0.33275163 5.669524 2.0924358 -4.384537 -1.5223357 -1.522336
N09  0.16061056 5.492080 2.1792519 -4.433386 -0.8622899 -2.536266
N10  0.15116054 6.293795 2.1473714 -4.818653 -1.7276103 -2.046064
N11 -0.19639101 5.992072 2.2275549 -4.546669 -1.2324829 -2.244084
N12  0.33143583 5.260578 2.0634761 -4.231175 -0.8025784 -2.621737
N13  0.84574692 4.725478 1.4304135 -4.183757  0.4214133 -3.239295
N14 -0.09382169 5.781811 2.3806137 -5.168996 -1.1318094 -1.767798
N15  1.18428523 4.473869 1.2419936 -4.010654  0.6467022 -3.536196
N16  0.96661755 4.964163 0.7479284 -4.229917  0.8330862 -3.281878
N17  0.02754589 5.724360 2.5364674 -4.759946 -1.7642136 -1.764214
N18 -0.27324645 5.683533 2.5078289 -4.973727 -1.6595408 -1.284847
N19 -0.03247004 5.841211 2.4001682 -5.225427 -1.6700788 -1.313404
N20 -0.67758914 5.698932 2.0203087 -4.174097 -1.1783644 -1.689190
N21 -0.31292086 5.672973 1.4410983 -4.342727 -0.8237465 -1.634677
N22 -0.22272375 6.119040 2.5718669 -4.811087 -1.4969008 -2.160195
N23 -0.03490901 5.370592 3.0380546 -4.516635 -1.5049024 -2.352200
N24 -0.10486605 5.674199 2.3779809 -4.604676 -1.4082727 -1.934366
N25 -0.13739817 5.974623 2.2829700 -4.519425 -1.3839306 -2.216840

rgr documentation built on May 2, 2019, 6:09 a.m.

Related to orthonorm in rgr...