data(expenditures)
x <- xOrig <- expenditures
## Aitchison distance between the first 2 observations:
aDist(x[,1], x[,2])
## set some missing values:
x[1,3] <- x[3,5] <- x[2,4] <- x[5,3] <- x[8,3] <- NA
## impute them:
xImp <- impCoda(x, method="ltsReg")$xImp
## calculate the relative Aitchsion distance between xOrig and xImp:
aDist(xOrig, xImp)
Run the code above in your browser using DataLab