1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
   |  
for(i in 1:dim(tableau))
{
 
        reg<-lm(formula= x ~ y + z , data = tableau[[i]]);
 
        if(is.list(try(inf<-influence.measures(reg),silent=TRUE)))
        {
 
                # Reject
 
                for (x in list(which(apply(inf$is.inf, 1, any))))
                {
                        write.table(tableau[[i]][x,],"reject",sep="\t",row.names = FALSE,col.names = FALSE , quote = FALSE,append = TRUE);
                }
 
                # Good
 
                for (x in list(which(apply(!inf$is.inf, 1, any))))
                {
                        write.table(tableau[[i]][x,],"'good",sep="\t",row.names = FALSE,col.names = FALSE , quote = FALSE,append = TRUE);
                }
 
        }
 
 
} | 
Partager