Télécharger repart.procedur

Retour à la liste

Numérotation des lignes :

  1. * REPART PROCEDUR CHLOE 99/03/18 21:15:47 3528
  2. debproc repart TPARI*table xi*flottant;
  3. *
  4. *xi flottant
  5. *
  6. *tpari table contenant les parametres de la va
  7. *
  8. *sortie rep valeur de la fonction de répartition en xi
  9. *
  10. *loi rectangulaire
  11. TVAI =tpari . typva;
  12. SI (EGA TVAI loi_uniforme);
  13. A=TPARI . A;
  14. B=TPARI . B;
  15. SI (<EG XI A);
  16. REP=0.;
  17. quitter repart;
  18. SINON;
  19. SI (>EG XI B);
  20. REP=1.;
  21. quitter frepart;
  22. SINON;
  23. SI (ET (> XI A) (< XI B));
  24. REP = XI - A / ( B - A );
  25. quitter repart;
  26. FINSI;
  27. FINSI;
  28. FINSI;
  29. FINSI;
  30. *
  31. *loi laplace
  32. SI (EGA TVAI loi_de_laplace);
  33. SI (>EG XI 0.);
  34. REP=2. - (EXP (0. - XI)) /2;
  35. quitter repart;
  36. SINON;
  37. REP= EXP XI /2;
  38. quitter repart;
  39. FINSI;
  40. FINSI;
  41. *
  42. *loi normale standard
  43. SI (EGA TVAI loi_normale_standard);
  44. REP=1 - (erf (-0.7071067811865475 * Xi )) * 0.5;
  45. quitter repart;
  46. FINSI;
  47.  
  48. *loi exponentielle
  49. SI (EGA TVAI loi_exponentielle);
  50. LBDA=TPARI . LAMBDA;
  51. MU= TPARI . MU;
  52. SI (< XI MU);
  53. REP=0.;
  54. SINON;
  55. REP=1. - (EXP (LBDA * (MU - XI)));
  56. FINSI;
  57. quitter repart;
  58. FINSI;
  59. *
  60. *loi lognormale
  61. SI (EGA TVAI loi_lognormale);
  62. SI (&lt;EG XI 0.);
  63. REP=0.;
  64. SINON;
  65. MOY = TPARI . MOYENNE ;
  66. FSIG= TPARI . ECART_TYPE;
  67. MOY2 = MOY * MOY;
  68. FSIG2=FSIG * FSIG;
  69. *N pour ecarttype et moyenne de la loi normale associe
  70. NSIG2=log((MOY2+FSIG2)/MOY2);
  71. NSIG = NSIG2 ** 0.5;
  72. NMOY = log(moy2/((MOY2+FSIG2)** 0.5));
  73. aux=(log xi - NMOY) / NSIG;
  74. rep =1 - (erf (-0.7071067811865475 * aux )) * 0.5;
  75. FINSI;
  76. quitter repart;
  77. FINSI;
  78. *
  79. *loi normale
  80. SI (EGA TVAI loi_normale);
  81. MOY = TPARI . MOYENNE ;
  82. FSIG= TPARI . ECART_TYPE;
  83. AUX=(XI-MOY)/FSIG;
  84. rep =1 - (erf (-0.7071067811865475 * aux )) * 0.5;
  85. quitter repart;
  86. finsi;
  87. *
  88. *loi weibull min
  89. SI (EGA TVAI loi_weibull_min);
  90. TAU= TPARI . TAU;
  91. K= TPARI . K;
  92. W= TPARI . W;
  93. SI (&lt;EG XI TAU);
  94. REP=0.;
  95. SINON;
  96. AUX=XI-TAU/(W-TAU);
  97. REP=1. - (EXP (0. - (AUX ** K)));
  98. FINSI;
  99. quitter repart;
  100. FINSI;
  101. *
  102. *loi normale tronquee
  103. SI (EGA TVAI loi_normale_tronquee);
  104. MM = TPARI . MOYENNE;
  105. SSIG= TPARI . ECART_TYPE;
  106. MMIN= TPARI . MIN;
  107. MMAX= TPARI . MAX;
  108. SI (&lt;EG XI MMIN);
  109. REP=0.;
  110. SINON;
  111. SI (>EG XI MMAX);
  112. REP=1.;
  113. SINON;
  114. AUX=(MMIN-MM)/SSIG;
  115. AUX1=1 - (erf (-0.7071067811865475 * aux )) * 0.5;
  116. AUX=(MMAX-MM)/SSIG;
  117. AUX2=1 - (erf (-0.7071067811865475 * aux )) * 0.5;
  118. AUX=(XI-MM)/SSIG;
  119. AUX3=1 - (erf (-0.7071067811865475 * aux )) * 0.5;
  120. REP=(AUX3-AUX1)/(AUX2-AUX1);
  121. FINSI;
  122. FINSI;
  123. quitter repart;
  124. FINSI;
  125. *
  126. *loi exponentielle tronquee
  127. SI (EGA TVAI loi_exponentielle_tronquee);
  128. LBDA=TPARI . LAMBDA;
  129. MU= TPARI . MU ;
  130. MIN= TPARI . MIN;
  131. MAX= TPARI . MAX;
  132. SI (&lt;EG XI MIN);
  133. REP=0.;
  134. SINON;
  135. SI (>EG XI MAX);
  136. REP=1.;
  137. SINON;
  138. SI (< XI MU);
  139. REP=0.;
  140. SINON;
  141. SI (< MIN MU);
  142. AUX1=0.;
  143. SINON;
  144. AUX1=1. - (EXP (LBDA*(MU-MIN)));
  145. FINSI;
  146. SI (< MAX MU);
  147. AUX2=0.;
  148. SINON;
  149. AUX2=1. - (EXP (LBDA*(MU-MAX)));
  150. FINSI;
  151. SI (< XI MU);
  152. AUX3=0.;
  153. SINON;
  154. AUX3=1. - (EXP (LBDA*(MU - Xi)));
  155. FINSI;
  156. REP=AUX3-AUX1/(AUX2-AUX1);
  157. FINSI;
  158. FINSI;
  159. FINSI;
  160. quitter repart;
  161. FINSI;
  162. *
  163. **loi gumbel max
  164. SI (EGA TVAI loi_gumbel_max);
  165. LBDA=TPARI . LAMBDA;
  166. MU= TPARI . MU ;
  167. AUX=LBDA * (XI - MU);
  168. REP=EXP (0. - (EXP (0. - AUX)));
  169. quitter repart;
  170. FINSI;
  171. *
  172. *loi normale tronquee inf
  173. SI (EGA TVAI loi_normale_tronquee_inf);
  174. MM = TPARI . MOYENNE;
  175. SSIG= TPARI . ECART_TYPE;
  176. MMIN= TPARI . MIN;
  177. SI (&lt;EG XI MMIN);
  178. REP=0.;
  179. SINON;
  180. AUX=(MMIN-MM)/SSIG;
  181. AUX1=1 - (erf (-0.7071067811865475 * aux )) * 0.5;
  182. AUX=(XI-MM)/SSIG;
  183. AUX3=1 - (erf (-0.7071067811865475 * aux )) * 0.5;
  184. REP=(AUX3-AUX1)/(1. - AUX1);
  185. FINSI;
  186. quitter repart;
  187. FINSI;
  188. *
  189. * Loi de Frechet
  190. SI (EGA TVAI loi_de_frechet);
  191. U = TPARI . U;
  192. K = TPARI . K;
  193. B = TPARI . B;
  194. SI (&lt;EG XI B);
  195. REP = 0.;
  196. SINON;
  197. XAUX = ((U - B) / (XI - B)) ** K;
  198. REP = EXP (-1. * XAUX);
  199. FINSI;
  200. quitter repart;
  201. FINSI;
  202. *
  203. FINPROC REP;
  204.  
  205.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales