# NOT RUN {
tmp<-set.seed(1400)
A <- matrix(c(0.1,0.2,0.3,0.1),nrow=2)
Mvar <- 0.1*ilrvar2clr(A%*%t(A))
Mcenter <- acomp(c(1,2,1))
data(SimulatedAmounts)
datas <- list(data1=sa.outliers1,data2=sa.outliers2,data3=sa.outliers3,
data4=sa.outliers4,data5=sa.outliers5,data6=sa.outliers6)
opar<-par(mfrow=c(2,3),pch=19,mar=c(3,2,2,1))
tmp<-mapply(function(x,y) {
outlierplot(x,type="scatter",class.type="grade");
title(y)
},datas,names(datas))
par(mfrow=c(2,3),pch=19,mar=c(3,2,2,1))
tmp<-mapply(function(x,y) {
myCls2 <- OutlierClassifier1(x,alpha=0.05,type="all",corrected=TRUE)
outlierplot(x,type="scatter",classifier=OutlierClassifier1,class.type="best",
Legend=legend(1,1,levels(myCls),xjust=1,col=colcode,pch=pchcode),
pch=as.numeric(myCls2));
legend(0,1,legend=levels(myCls2),pch=1:length(levels(myCls2)))
title(y)
},datas,names(datas))
par(mfrow=c(2,3),pch=19,mar=c(3,2,2,1))
for( i in 1:length(datas) )
outlierplot(datas[[i]],type="ecdf",main=names(datas)[i])
par(mfrow=c(2,3),pch=19,mar=c(3,2,2,1))
for( i in 1:length(datas) )
outlierplot(datas[[i]],type="portion",main=names(datas)[i])
par(mfrow=c(2,3),pch=19,mar=c(3,2,2,1))
for( i in 1:length(datas) )
outlierplot(datas[[i]],type="nout",main=names(datas)[i])
par(opar)
# }
Run the code above in your browser using DataLab