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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
Data appartenance_txrp_sortie;
DO numero=1 TO 10*&borne;
OUTPUT;
END;
RUN;
data appartenance_txrp_sortie;set appartenance_txrp_sortie;by numero;
if first.numero then abscisse+0.1;run;
data appartenance_txrp_sortie;set appartenance_txrp_sortie;
if abscisse<=100*(&max_1+(&min_2-&max_1)/3) then txrach1=1;
if abscisse<=100*(&max_1+(&min_2-&max_1)/3) then txrach2=0;
if abscisse<=100*(&max_1+(&min_2-&max_1)/3) then txrach3=0;
if abscisse<=100*(&max_1+(&min_2-&max_1)/3) then txrach4=0;
if abscisse<=100*(&max_1+(&min_2-&max_1)/3) then txrach5=0;
if (abscisse>=100*(&min_2-(&min_2-&max_1)/3) and abscisse<=100*(&max_2+(&min_3-&max_2)/3)) then txrach1=0;
if (abscisse>=100*(&min_2-(&min_2-&max_1)/3) and abscisse<=100*(&max_2+(&min_3-&max_2)/3)) then txrach2=1;
if (abscisse>=100*(&min_2-(&min_2-&max_1)/3) and abscisse<=100*(&max_2+(&min_3-&max_2)/3)) then txrach3=0;
if (abscisse>=100*(&min_2-(&min_2-&max_1)/3) and abscisse<=100*(&max_2+(&min_3-&max_2)/3)) then txrach4=0;
if (abscisse>=100*(&min_2-(&min_2-&max_1)/3) and abscisse<=100*(&max_2+(&min_3-&max_2)/3)) then txrach5=0;
if (abscisse>=100*(&min_3-(&min_3-&max_2)/3) and abscisse<=100*(&max_3+(&min_4-&max_3)/3)) then txrach1=0;
if (abscisse>=100*(&min_3-(&min_3-&max_2)/3) and abscisse<=100*(&max_3+(&min_4-&max_3)/3)) then txrach2=0;
if (abscisse>=100*(&min_3-(&min_3-&max_2)/3) and abscisse<=100*(&max_3+(&min_4-&max_3)/3)) then txrach3=1;
if (abscisse>=100*(&min_3-(&min_3-&max_2)/3) and abscisse<=100*(&max_3+(&min_4-&max_3)/3)) then txrach4=0;
if (abscisse>=100*(&min_3-(&min_3-&max_2)/3) and abscisse<=100*(&max_3+(&min_4-&max_3)/3)) then txrach5=0;
if (abscisse>=100*(&min_4-(&min_4-&max_3)/3) and abscisse<=100*(&max_4+(&min_5-&max_4)/3)) then txrach1=0;
if (abscisse>=100*(&min_4-(&min_4-&max_3)/3) and abscisse<=100*(&max_4+(&min_5-&max_4)/3)) then txrach2=0;
if (abscisse>=100*(&min_4-(&min_4-&max_3)/3) and abscisse<=100*(&max_4+(&min_5-&max_4)/3)) then txrach3=0;
if (abscisse>=100*(&min_4-(&min_4-&max_3)/3) and abscisse<=100*(&max_4+(&min_5-&max_4)/3)) then txrach4=1;
if (abscisse>=100*(&min_4-(&min_4-&max_3)/3) and abscisse<=100*(&max_4+(&min_5-&max_4)/3)) then txrach5=0;
if abscisse>=100*(&min_5-(&min_5-&max_4)/3) then txrach1=0;
if abscisse>=100*(&min_5-(&min_5-&max_4)/3) then txrach2=0;
if abscisse>=100*(&min_5-(&min_5-&max_4)/3) then txrach3=0;
if abscisse>=100*(&min_5-(&min_5-&max_4)/3) then txrach4=0;
if abscisse>=100*(&min_5-(&min_5-&max_4)/3) then txrach5=1;
run;
data appartenance_txrp_sortie;set appartenance_txrp_sortie;
if (abscisse>100*(&max_1+(&min_2-&max_1)/3) and abscisse<100*(&min_2-(&min_2-&max_1)/3)) then txrach3=0;
if (abscisse>100*(&max_1+(&min_2-&max_1)/3) and abscisse<100*(&min_2-(&min_2-&max_1)/3)) then txrach4=0;
if (abscisse>100*(&max_1+(&min_2-&max_1)/3) and abscisse<100*(&min_2-(&min_2-&max_1)/3)) then txrach5=0;
if (abscisse>100*(&max_2+(&min_3-&max_2)/3) and abscisse<100*(&min_3-(&min_3-&max_2)/3)) then txrach1=0;
if (abscisse>100*(&max_2+(&min_3-&max_2)/3) and abscisse<100*(&min_3-(&min_3-&max_2)/3)) then txrach4=0;
if (abscisse>100*(&max_2+(&min_3-&max_2)/3) and abscisse<100*(&min_3-(&min_3-&max_2)/3)) then txrach5=0;
if (abscisse>100*(&max_3+(&min_4-&max_3)/3) and abscisse<100*(&min_4-(&min_4-&max_3)/3)) then txrach5=0;
if (abscisse>100*(&max_3+(&min_4-&max_3)/3) and abscisse<100*(&min_4-(&min_4-&max_3)/3)) then txrach1=0;
if (abscisse>100*(&max_3+(&min_4-&max_3)/3) and abscisse<100*(&min_4-(&min_4-&max_3)/3)) then txrach2=0;
if (abscisse>100*(&max_4+(&min_5-&max_4)/3) and abscisse<100*(&min_5-(&min_5-&max_4)/3)) then txrach1=0;
if (abscisse>100*(&max_4+(&min_5-&max_4)/3) and abscisse<100*(&min_5-(&min_5-&max_4)/3)) then txrach2=0;
if (abscisse>100*(&max_4+(&min_5-&max_4)/3) and abscisse<100*(&min_5-(&min_5-&max_4)/3)) then txrach3=0;
run;
%macro pente(alpha, beta,a,b); /*macro pour les parties linéaires, ne marche pas*/
%let k=(&beta-&alpha)/0.1;
%let i=1;
%do %while (abscisse<&beta and abscisse>&alpha);
txrach&a=1-&i*(&beta-&alpha)/&k;
txrach&b=&i*(&beta-&alpha)/&k;
%let i=&i+1;
%end;
%mend;
data appartenance_txrp_sortie;set appartenance_txrp_sortie; /*ne marche pas*/
%pente(100*(&max_1+(&min_2-&max_1)/3),(&min_2-(&min_2-&max_1)/3),1,2);
run; |
Partager