Inputparametters.R + SelecModel
[valse.git] / SelectModel / selectionindice.R
CommitLineData
35b42a4b
B
1selectionindice = function(phi, seuil){
2 dim_phi = dim(phi)
3 pp = dim_phi[1]
4 m = dim_phi[2]
5
6 A = matrix(0, pp, m)
7 B = matrix(0, pp, m)
8
9 for(j in 1:pp){
10 cpt1 = 0
11 cpt2 = 0
12 for(mm in 1:m){
13 if(max(phi[j,mm,])> seuil){
14 cpt1 = cpt1 + 1
15 A[j,cpt] = mm
16 }
17 else{
18 cpt2 = cpt2+1
19 B[j, cpt2] = mm
20 }
21 }
22 }
23 return(list(A,B))
24}