* PARASTAT PROCEDUR AM 99/07/13 21:15:02 3632 *|===================================================================== *| *| << OBJET >> : *| *| Procedure permettant de calculer la moyenne, l ecart-type, *| le coefficient de symetrie et le coefficient d aplatissement *| *| *| << ENTREE >> : *| -- ARGUMENTS OBLIGATOIRES DANS TOUS LES CAS -- *| *| SUPTAB = objet de type TABLE dont les indices sont des objets de *| type ENTIER. *| SUPTAB.i = objet de type TABLE dont les indices sont des objets de *| type MOTS. *| SUPTAB.i.POINT = objet de type REEL contenant le i-eme point *| SUPTAB.i.POIDS = objet de type REEL contenant le i-eme poids *| *| *| << SORTIE >> : *| *| MU = objet de type REEL contenant le moyenne *| SIGMA = objet de type REEL contenant l ecart-type *| RB1 = objet de type REEL contenant le coefficient de symetrie *| B2 = objet de type REEL contenant le coefficient d'aplatissement *| *|===================================================================== * * ______________________ * * DECLARATIONS GENERALES * ______________________ * * _____ * * TESTS * _____ * * * Composantes SCAL pour les calculs sur des CHPO * REPE BOUC N; FIN BOUC; FINSI; * _________________ * * DEBUT DES CALCULS * _________________ * * MU = 0. * SUPTAB. 1 .POINT; VAR = 0. * SUPTAB. 1 .POINT; MU3 = 0. * SUPTAB. 1 .POINT; MU4 = 0. * SUPTAB. 1 .POINT; * * Calcul de la moyenne * *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; *MESS '%%% Calcul de la moyenne'; *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; REPE BOUC N; MU = MU + (SUPTAB .&BOUC. POINT * SUPTAB .&BOUC. POIDS); FIN BOUC; * * Calcul de l ecart-type * *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; *MESS '%%% Calcul de la variance'; *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; REPE BOUC N; VAR = VAR + ( ( (SUPTAB .&BOUC. POINT - MU)**2 ) * SUPTAB .&BOUC. POIDS ); FIN BOUC; SINON; REPE BOUC N; VAR = VAR + ( ( (SUPTAB .&BOUC. POINT - MU)* (SUPTAB .&BOUC. POINT - MU) ) * SUPTAB .&BOUC. POIDS ); FIN BOUC; FINSI; OY = OY**0.5; SINON; SIGMA = VAR**0.5; FINSI; * * Calcul du coefficient de symetrie * *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; *MESS '%%% Calcul de la symetrie'; *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; REPE BOUC N; MU3 = MU3 + ( ( (SUPTAB .&BOUC. POINT - MU)**3 ) * SUPTAB .&BOUC. POIDS ); FIN BOUC; SINON; REPE BOUC N; MU3 = MU3 + ( ( (SUPTAB .&BOUC. POINT - MU)* (SUPTAB .&BOUC. POINT - MU)* (SUPTAB .&BOUC. POINT - MU) ) * SUPTAB .&BOUC. POIDS ); FIN BOUC; FINSI; RB1 = MU3 * (1 / (var*sigma)); SINON; RB1 = MU3 * (1/(sigma**3)); FINSI; RB1 = CHANGER 'ATTRIBUT' RB1 'NATURE' NAT; FINSI; * * Calcul du coefficient d aplatissement * *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; *MESS '%%% Calcul de l applatissement'; *MESS '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'; REPE BOUC N; MU4 = MU4 + ( ( (SUPTAB .&BOUC. POINT - MU)**4 ) * SUPTAB .&BOUC. POIDS ); FIN BOUC; SINON; REPE BOUC N; MU4 = MU4 + ( ( (SUPTAB .&BOUC. POINT - MU)* (SUPTAB .&BOUC. POINT - MU)* (SUPTAB .&BOUC. POINT - MU)* (SUPTAB .&BOUC. POINT - MU) ) * SUPTAB .&BOUC. POIDS ); FIN BOUC; FINSI; B2 = MU4 *(1/(var*var)); SINON; B2 = MU4 *(1/(var**2)); FINSI; B2 = CHANGER 'ATTRIBUT' B2 'NATURE' NAT; FINSI; * * 'FINPROC' MU SIGMA RB1 B2;
© Cast3M 2003 - Tous droits réservés.
Mentions légales