Title: CoDaPack: A tool for Compositional Data Analysis
1CoDaPack A tool for Compositional Data Analysis
- M. Comas-Cufí S. Thió-Henestrosa
- (marc.comas_at_udg.edu)
- Dept. Computer Sciences and Applied Mathematics
- University of Girona (UdG)
- Catalonia-Spain
2Whats coda?
- Vector xx1, x2,, xD
- Add to a constant 100, 1, 106, 109,
- Units percentage, part per one, ppm, ppb,
- Has positive elements
- Carry only relative information
- Examples
- Production (pieces) Ok, NonOk, Rework 87,
1, 12 - Household budget () Food, Serv., Other
1150, 623, 351 - Daily activities (h) Work, Sleep, Other
7.5, 7.5, 9
3Sample space of coda simplex
- Compositional data live in the simplex (S)
represented in ternary (D3), quaternary (D4),
diagram
D3 S3
D4 S4
4Euclidean distance appropriate?
B
A
B2010 0.3, 0.4, 0.3
A2010 0.1, 0.2, 0.7
5Euclidean distance appropriate?
B
A
STOP PROD.
HALF PROD.
NON-STOP PROD.
NON-STOP PROD.
STOP PROD.
HALF PROD.
0.4
0.3
0.2
0.1
0.1
0.7
0.2
0.3
0.3
0.4
2009 2010
0.7
0.3
0.1
0.7
0.2
0.3
0.3
0.4
2009 ? 2010 Factory A Factory B
Stop Prod
Half Prod
Non-Stop Prod
-50
-25
100
33.3
0
0
6Euclidean distance appropriate?
STOP PROD.
Our interest lies on relative values A2010/A2009
1/2, 2, 1 B2010/B20093/4, 4/3, 1
Euclidian distance de(A) de(B) 0.14
B2009
A2009
B2010
A2010
Aitchison distance da(A)0.6276 da(B)
0.3970
HALF PROD.
NON-STOP PROD.
7Classical multivariate normal model appropriate?
8Log-ratio methodology
- Aitchison geometry to CODA is equivalent to
classical euclidean geometry to log-ratio values.
Simplex (restricted space) ? Real space (non
restricted) x1,,xD
log(xi/xj), i,j 1,,D, j ? i
9CoDaPack 2
10Software
- CoDaPack software developed by the Departament
of Computer Science and Applied Mathematics in
the Universitat de Girona. Easy and intuitive. - http//ima.udg.edu/codapack marc.comas_at_udg.edu
- compositions (R-package) analysis of
compositional and positive data using different
approaches. - http//cran.r-project.org/ raimon.tolosana_at_upc.e
du - robCompositions (R-package) robust estimation
for compositional data - http//cran.r-project.org/ templ_at_tuwien.ac.at
11References
- Aitchison, J., 1986. The Statistical Analysis of
Compositional Data. Chapman Hall, London.
Reprinted in 2003 with additional material
byBlackburn Press. - Proceedings of CoDaWork, 2003-2005-2008-2011
available in http//dugi-doc.udg.edu/handle/10256/
150. - CoDaWeb Compositional Data Analysis Web Site
http//www.compositionaldata.com/