Bonjour ,
je suis en stage de fin de master 1 dans une Enterprise .
j'ai un problème sur mon ACM
je n'ai aucun message d'erreur lorsque j’exécute le code suivant " "
je n'ai aucune sortie . svp aidez moi , par la suite , je dois extraire les composante principale de mon ACM , ce qui me permettre de calculer la distante de Malahanobis pour détecter les individus exceptionnels .
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
71 data exemple ; input ident $ csp $ sport $ situation$; cards ; quatre csp3 S oui un csp1 R oui deux csp2 R non trois csp2 S non cinq csp3 T oui six csp4 T non ; run; /* ACM*/ proc transreg data=exemple design noprint ; model class(csp situation sport / zero=none); output out= ok; id ident ; run; %macro PLOTCOR(DATA= ,ID= ,AXEH= ,AXEV= ,COND= )/ DES="Réprésentation des individus et variable en AFC ou en ACM"; DATA _Graph_; set &DATA; %if %length(&COND)^=0 %then %do; &COND; %end; run; data CORANNOT; length color $10.; length text $10.; length function $10.; set _Graph_; function="Label"; position="1"; when="B"; x=Dim&AXEH; y=Dim&AXEV; xsys='2'; ysys='2'; text=&ID; if _TYPE_="OBS" then color="blue"; else if _TYPE_="VAR" then color="red"; else if _TYPE_="VARSUP" then color="green"; size=0.8; Output; function="Symbol"; position="5"; when="B"; x=Dim&AXEH; y=Dim&AXEV; xsys='2'; ysys='2'; text="triangle"; size=3*(SqCos&AXEH+SqCos&AXEV); if _TYPE_="OBS" then color="blue"; else if _TYPE_="VAR" then color="red"; else if _TYPE_="SUPVAR" then color="green"; output; run; goptions reset=all gunit=pct hsize=7 vsize= 7; axis1 minor=none offset=(4,4) major=(h=0.1 w=1) label=("Axe&AXEH"); axis2 minor=none offset=(4,4) major=(h=0.1 w=1) label=("Axe&AXEV"); symbol v=none; proc gplot data=CORANNOT; plot y*x=1/frame cframe=white href=0 vref=0 overlay annotate=CORANNOT grid haxis=axis1 vaxis=axis2; run; quit; proc datasets lib=work memtype=DATA nolist; delete _Graph_ CORANNOT; run; %mend Plotcor; %plotcor(Data=ok,id=ident , axeh=1 , axev= 2 , cond=if_typ_in("OBS" "SUPOBS");
Partager