X-Git-Url: https://git.auder.net/?p=valse.git;a=blobdiff_plain;f=R%2Fsuppressionmodelesegaux2.R;h=741793b4fbb862eb2dd454223f38c0d0d344737e;hp=4574afc8f117488542bf29299fb7c856b16d469b;hb=39046da6016f15d625bd99cf0303ea8beb838c79;hpb=8266149c7d93aa0543cee2a1b22e1233e7b82617 diff --git a/R/suppressionmodelesegaux2.R b/R/suppressionmodelesegaux2.R index 4574afc..741793b 100644 --- a/R/suppressionmodelesegaux2.R +++ b/R/suppressionmodelesegaux2.R @@ -1,26 +1,24 @@ -suppressionmodelesegaux2 = function(B1,rho,pi){ - ind = c() - dim_B1 = dim(B1) - B2 = array(0,dim=c(dim_B1[1],dim_B1[2],dim_B1[3])) - nombreLambda=dim_B1[[2]] - glambda = rep(0,nombreLambda) - - #for(j in 1:nombreLambda){ - # for(ll in 1:(l-1)){ - # if(B1[,,l] == B1[,,ll]){ - # ind = c(ind, l) - # } - # } - #} - #ind = unique(ind) - #B1 = B1[,,-ind] - #rho = rho[,,,-ind] - #pi = pi[,-ind] - - suppressmodel = suppressionmodelesegaux(B1,B2,glambda,rho,pi) - B1 = suppressmodel[[1]] - ind = suppressmodel[[4]] - rho = suppressmodel[[5]] - pi = suppressmodel[[6]] - return(list(B1,ind,rho,pi)) -} \ No newline at end of file +suppressionmodelesegaux2 = function(B1,rho,pi) +{ + ind = c() + dim_B1 = dim(B1) + B2 = array(0,dim=c(dim_B1[1],dim_B1[2],dim_B1[3])) + nombreLambda=dim_B1[[2]] + glambda = rep(0,nombreLambda) + + #for(j in 1:nombreLambda){ + # for(ll in 1:(l-1)){ + # if(B1[,,l] == B1[,,ll]){ + # ind = c(ind, l) + # } + # } + #} + #ind = unique(ind) + #B1 = B1[,,-ind] + #rho = rho[,,,-ind] + #pi = pi[,-ind] + + suppressmodel = suppressionmodelesegaux(B1,B2,glambda,rho,pi) + return (list(B1 = suppressmodel$B1, ind = suppressmodel$B2, + rho = suppressmodel$rho, pi = suppressmodel$pi)) +}