January 13 2008 12:20:43.586 PM ASA266_PRB FORTRAN90 version Tests for the ASA266 package. TEST01 ALNORM, NORMP, and NPROB are routines that compute the cumulative density function for the normal distribution. X CDF1 1-CDF1 CDF2 1-CDF2 PDF2 CDF3 1-CDF3 PDF3 0.00000 0.500000 0.500000 0.500000 0.500000 0.398942 0.500000 0.500000 0.398942 0.200000 0.579260 0.420740 0.579260 0.420740 0.391043 0.579260 0.420740 0.391043 0.400000 0.655422 0.344578 0.655422 0.344578 0.368270 0.655422 0.344578 0.368270 0.600000 0.725747 0.274253 0.725747 0.274253 0.333225 0.725747 0.274253 0.333225 0.800000 0.788145 0.211855 0.788145 0.211855 0.289692 0.788145 0.211855 0.289692 1.00000 0.841345 0.158655 0.841345 0.158655 0.241971 0.841345 0.158655 0.241971 1.20000 0.884930 0.115070 0.884930 0.115070 0.194186 0.884930 0.115070 0.194186 1.40000 0.919243 0.807567E-01 0.919243 0.807567E-01 0.149727 0.919243 0.807567E-01 0.149727 1.60000 0.945201 0.547993E-01 0.945201 0.547993E-01 0.110921 0.945201 0.547993E-01 0.110921 1.80000 0.964070 0.359303E-01 0.964070 0.359303E-01 0.789502E-01 0.964070 0.359303E-01 0.789502E-01 2.00000 0.977250 0.227501E-01 0.977250 0.227501E-01 0.539910E-01 0.977250 0.227501E-01 0.539910E-01 2.20000 0.986097 0.139034E-01 0.986097 0.139034E-01 0.354746E-01 0.986097 0.139034E-01 0.354746E-01 2.40000 0.991802 0.819753E-02 0.991802 0.819753E-02 0.223945E-01 0.991802 0.819753E-02 0.223945E-01 2.60000 0.995339 0.466119E-02 0.995339 0.466119E-02 0.135830E-01 0.995339 0.466119E-02 0.135830E-01 2.80000 0.997445 0.255513E-02 0.997445 0.255513E-02 0.791545E-02 0.997445 0.255513E-02 0.791545E-02 3.00000 0.998650 0.134990E-02 0.998650 0.134990E-02 0.443185E-02 0.998650 0.134990E-02 0.443185E-02 TEST02 PPND, PPND7 and PPND16 compute the percentage points of the normal distribution. CDF, PPND(CDF), PPND7(CDF), PPND16(CDF) 0.100000 -1.28155 -1.28155 -1.28155 0.200000 -0.841621 -0.841621 -0.841621 0.300000 -0.524400 -0.524401 -0.524400 0.400000 -0.253347 -0.253347 -0.253347 0.500000 0.00000 0.00000 0.00000 0.600000 0.253347 0.253347 0.253347 0.700000 0.524400 0.524401 0.524400 0.800000 0.841621 0.841621 0.841621 0.900000 1.28155 1.28155 1.28155 TEST03 digamma(X) = d ( Log ( Gamma ( X ) ) ) / dX. DIGAMMA and PSI compute the digamma function: X DIGAMMA PSI 0.100000 -10.4238 -10.4238 0.200000 -5.28904 -5.28904 0.300000 -3.50252 -3.50252 0.400000 -2.56138 -2.56138 0.500000 -1.96351 -1.96351 0.600000 -1.54062 -1.54062 0.700000 -1.22002 -1.22002 0.800000 -0.965008 -0.965009 0.900000 -0.754927 -0.754927 1.00000 -0.577216 -0.577216 TEST04 TRIGAMMA computes the trigamma function: trigamma(X) = d**2 ( Log ( Gamma ( X ) ) ) / dX**2. X TRIGAMMA 0.100000 101.433 0.200000 26.2674 0.300000 12.2454 0.400000 7.27536 0.500000 4.93480 0.600000 3.63621 0.700000 2.83405 0.800000 2.29947 0.900000 1.92254 1.00000 1.64493 TEST05 ALNGAM, ALOGAM, GAMMA_LOG, and LNGAMMA compute the logarithm of the gamma function. X ALNGAM ALOGAM GAMMA_LOG LNGAMMA 0.100000 2.25271 2.25271 2.25271 2.25271 0.200000 1.52406 1.52406 1.52406 1.52406 0.300000 1.09580 1.09580 1.09580 1.09580 0.400000 0.796678 0.796679 0.796678 0.796677 0.500000 0.572365 0.572365 0.572365 0.572365 0.600000 0.398234 0.398233 0.398234 0.398234 0.700000 0.260867 0.260866 0.260867 0.260868 0.800000 0.152060 0.152059 0.152060 0.152059 0.900000 0.663763E-01 0.663771E-01 0.663763E-01 0.663763E-01 1.00000 -0.00000 -0.496395E-06 0.00000 0.476837E-06 TEST06 GAMAIN, GAMMDS and GAMMAD compute the incomplete Gamma integral. X P GAMMDS GAMMAD GAMAIN 0.100000 0.100000 0.827552 0.827552 0.827552 0.100000 0.200000 0.676043 0.676043 0.676043 0.100000 0.300000 0.545913 0.545913 0.545913 0.100000 0.400000 0.436236 0.436236 0.436236 0.100000 0.500000 0.345279 0.345279 0.345279 0.100000 0.600000 0.270899 0.270899 0.270899 0.100000 0.700000 0.210824 0.210824 0.210824 0.100000 0.800000 0.162840 0.162840 0.162840 0.100000 0.900000 0.124895 0.124895 0.124895 0.100000 1.00000 0.951626E-01 0.951626E-01 0.951626E-01 0.200000 0.100000 0.879420 0.879420 0.879420 0.200000 0.200000 0.764435 0.764435 0.764435 0.200000 0.300000 0.657507 0.657507 0.657507 0.200000 0.400000 0.560104 0.560104 0.560104 0.200000 0.500000 0.472911 0.472911 0.472911 0.200000 0.600000 0.396022 0.396022 0.396022 0.200000 0.700000 0.329108 0.329108 0.329108 0.200000 0.800000 0.271553 0.271553 0.271553 0.200000 0.900000 0.222566 0.222566 0.222566 0.200000 1.00000 0.181269 0.181269 0.181269 0.300000 0.100000 0.908358 0.908358 0.908358 0.300000 0.200000 0.816527 0.816527 0.816527 0.300000 0.300000 0.726957 0.726957 0.726957 0.300000 0.400000 0.641490 0.641490 0.641490 0.300000 0.500000 0.561422 0.561422 0.561422 0.300000 0.600000 0.487583 0.487583 0.487583 0.300000 0.700000 0.420417 0.420417 0.420417 0.300000 0.800000 0.360060 0.360060 0.360060 0.300000 0.900000 0.306407 0.306407 0.306407 0.300000 1.00000 0.259182 0.259182 0.259182 0.400000 0.100000 0.927574 0.927574 0.927574 0.400000 0.200000 0.852337 0.852337 0.852337 0.400000 0.300000 0.776381 0.776381 0.776381 0.400000 0.400000 0.701441 0.701441 0.701441 0.400000 0.500000 0.628907 0.628907 0.628907 0.400000 0.600000 0.559835 0.559835 0.559835 0.400000 0.700000 0.494986 0.494986 0.494986 0.400000 0.800000 0.434858 0.434858 0.434858 0.400000 0.900000 0.379725 0.379725 0.379725 0.400000 1.00000 0.329680 0.329680 0.329680 0.500000 0.100000 0.941403 0.941403 0.941402 0.500000 0.200000 0.878775 0.878775 0.878775 0.500000 0.300000 0.813812 0.813812 0.813812 0.500000 0.400000 0.748019 0.748019 0.748018 0.500000 0.500000 0.682690 0.682690 0.682689 0.500000 0.600000 0.618901 0.618901 0.618901 0.500000 0.700000 0.557515 0.557515 0.557515 0.500000 0.800000 0.499192 0.499192 0.499192 0.500000 0.900000 0.444406 0.444407 0.444407 0.500000 1.00000 0.393469 0.393469 0.393469 0.600000 0.100000 0.951832 0.951832 0.951832 0.600000 0.200000 0.899123 0.899123 0.899123 0.600000 0.300000 0.843212 0.843211 0.843211 0.600000 0.400000 0.785350 0.785350 0.785351 0.600000 0.500000 0.726678 0.726678 0.726678 0.600000 0.600000 0.668198 0.668198 0.668198 0.600000 0.700000 0.610769 0.610769 0.610769 0.600000 0.800000 0.555101 0.555101 0.555101 0.600000 0.900000 0.501764 0.501764 0.501764 0.600000 1.00000 0.451188 0.451188 0.451188 0.700000 0.100000 0.959945 0.959945 0.959945 0.700000 0.200000 0.915220 0.915220 0.915220 0.700000 0.300000 0.866863 0.866863 0.866863 0.700000 0.400000 0.815892 0.815892 0.815892 0.700000 0.500000 0.763276 0.763276 0.763276 0.700000 0.600000 0.709908 0.709908 0.709908 0.700000 0.700000 0.656589 0.656589 0.656589 0.700000 0.800000 0.604021 0.604021 0.604021 0.700000 0.900000 0.552799 0.552799 0.552799 0.700000 1.00000 0.503415 0.503415 0.503415 0.800000 0.100000 0.966395 0.966395 0.966395 0.800000 0.200000 0.928202 0.928202 0.928203 0.800000 0.300000 0.886215 0.886215 0.886215 0.800000 0.400000 0.841245 0.841245 0.841245 0.800000 0.500000 0.794097 0.794097 0.794097 0.800000 0.600000 0.745542 0.745541 0.745541 0.800000 0.700000 0.696301 0.696301 0.696301 0.800000 0.800000 0.647032 0.647032 0.647032 0.800000 0.900000 0.598320 0.598320 0.598320 0.800000 1.00000 0.550671 0.550671 0.550671 0.900000 0.100000 0.971607 0.971607 0.971607 0.900000 0.200000 0.938827 0.938827 0.938827 0.900000 0.300000 0.902253 0.902253 0.902252 0.900000 0.400000 0.862521 0.862521 0.862521 0.900000 0.500000 0.820287 0.820287 0.820287 0.900000 0.600000 0.776205 0.776205 0.776205 0.900000 0.700000 0.730906 0.730906 0.730906 0.900000 0.800000 0.684986 0.684986 0.684986 0.900000 0.900000 0.638996 0.638996 0.638996 0.900000 1.00000 0.593430 0.593430 0.593430 1.00000 0.100000 0.975873 0.975873 0.975873 1.00000 0.200000 0.947620 0.947620 0.947620 1.00000 0.300000 0.915674 0.915674 0.915674 1.00000 0.400000 0.880526 0.880526 0.880526 1.00000 0.500000 0.842701 0.842701 0.842701 1.00000 0.600000 0.802740 0.802740 0.802740 1.00000 0.700000 0.761187 0.761187 0.761187 1.00000 0.800000 0.718571 0.718571 0.718571 1.00000 0.900000 0.675392 0.675393 0.675393 1.00000 1.00000 0.632120 0.632120 0.632120 TEST07 PPCHI2 computes the percentage points of the chi squared distribution. CDF, PPCHI2(CDF) For Chi**2 parameter value 1.00000 0.100000 0.157908E-01 0.200000 0.641848E-01 0.300000 0.148472 0.400000 0.274996 0.500000 0.454936 0.600000 0.708326 0.700000 1.07419 0.800000 1.64237 0.900000 2.70554 For Chi**2 parameter value 2.00000 0.100000 0.210721 0.200000 0.446287 0.300000 0.713350 0.400000 1.02165 0.500000 1.38629 0.600000 1.83258 0.700000 2.40795 0.800000 3.21888 0.900000 4.60517 For Chi**2 parameter value 3.00000 0.100000 0.584374 0.200000 1.00517 0.300000 1.42365 0.400000 1.86917 0.500000 2.36597 0.600000 2.94617 0.700000 3.66487 0.800000 4.64163 0.900000 6.25139 For Chi**2 parameter value 4.00000 0.100000 1.06362 0.200000 1.64878 0.300000 2.19470 0.400000 2.75284 0.500000 3.35669 0.600000 4.04463 0.700000 4.87843 0.800000 5.98862 0.900000 7.77944 For Chi**2 parameter value 5.00000 0.100000 1.61031 0.200000 2.34253 0.300000 2.99991 0.400000 3.65550 0.500000 4.35146 0.600000 5.13187 0.700000 6.06443 0.800000 7.28928 0.900000 9.23636 For Chi**2 parameter value 6.00000 0.100000 2.20413 0.200000 3.07009 0.300000 3.82755 0.400000 4.57016 0.500000 5.34812 0.600000 6.21076 0.700000 7.23114 0.800000 8.55806 0.900000 10.6446 For Chi**2 parameter value 7.00000 0.100000 2.83311 0.200000 3.82232 0.300000 4.67133 0.400000 5.49323 0.500000 6.34581 0.600000 7.28321 0.700000 8.38343 0.800000 9.80325 0.900000 12.0170 For Chi**2 parameter value 8.00000 0.100000 3.48954 0.200000 4.59357 0.300000 5.52742 0.400000 6.42265 0.500000 7.34412 0.600000 8.35052 0.700000 9.52446 0.800000 11.0301 0.900000 13.3616 For Chi**2 parameter value 9.00000 0.100000 4.16816 0.200000 5.38005 0.300000 6.39331 0.400000 7.35704 0.500000 8.34283 0.600000 9.41364 0.700000 10.6564 0.800000 12.2421 0.900000 14.6837 TEST08 For samples of a Dirichlet PDF, DIRICHLET_ESTIMATE estimates the parameters. DIRICHLET_MEAN finds the means; DIRICHLET_VARIANCE finds the variances; Sampled data: 1 0.178000 0.346000 0.476000 2 0.162000 0.307000 0.531000 3 0.830000E-01 0.448000 0.469000 4 0.870000E-01 0.474000 0.439000 5 0.780000E-01 0.503000 0.419000 6 0.400000E-01 0.456000 0.504000 7 0.490000E-01 0.363000 0.588000 8 0.100000 0.317000 0.583000 9 0.750000E-01 0.394000 0.531000 10 0.840000E-01 0.445000 0.471000 11 0.600000E-01 0.435000 0.505000 12 0.890000E-01 0.418000 0.493000 13 0.500000E-01 0.485000 0.465000 14 0.730000E-01 0.378000 0.549000 15 0.640000E-01 0.562000 0.374000 16 0.850000E-01 0.465000 0.450000 17 0.940000E-01 0.388000 0.518000 18 0.140000E-01 0.449000 0.537000 19 0.600000E-01 0.544000 0.396000 20 0.310000E-01 0.569000 0.400000 21 0.250000E-01 0.491000 0.484000 22 0.450000E-01 0.613000 0.342000 23 0.195000E-01 0.526000 0.454500 Observed means, variances are: 1 0.715435E-01 0.157825E-02 2 0.451130 0.656248E-02 3 0.477326 0.405826E-02 Index, Estimate, Lower Limit, Upper Limit: 1 3.21544 1.89029 4.54059 2 20.3826 11.9283 28.8369 3 21.6854 12.6926 30.6781 Expected means, variances are: 1 0.710070E-01 0.142524E-02 2 0.450112 0.534773E-02 3 0.478881 0.539187E-02 Alpha sum is 45.2834 NORMALIZED VALUES: Index, Estimate, Lower Limit, Upper Limit: 1 0.710070E-01 0.417436E-01 0.100270 2 0.450112 0.263415 0.636809 3 0.478881 0.280293 0.677469 Log likelikhood function = 73.1248 TEST09 For a Dirichlet distribution, DIRICHLET_SAMPLE samples; DIRICHLET_MEAN finds the means; DIRICHLET_VARIANCE finds the variances; DIRICHLET_ESTIMATE estimates the parameters. Distribution parameters are: 1 3.22000 2 20.3800 3 21.6800 Distribution means, variances are: 1 0.711131E-01 0.142731E-02 2 0.450088 0.534807E-02 3 0.478799 0.539219E-02 Number of samples is 1000 First few samples: 1 0.696092E-01 0.525664 0.404727 2 0.594694E-01 0.246473 0.694057 3 0.984657E-01 0.514532 0.387002 4 0.660891E-01 0.492584 0.441327 5 0.451493E-01 0.403304 0.551546 6 0.118176 0.423726 0.458098 7 0.106391 0.503891 0.389718 8 0.409948E-01 0.455046 0.503960 9 0.119071 0.501638 0.379291 10 0.447262E-01 0.478095 0.477179 Observed means, variances are: 1 0.689833E-01 0.124704E-02 2 0.450313 0.567338E-02 3 0.480704 0.555065E-02 Index, Estimate, Lower Limit, Upper Limit: 1 3.23810 3.03528 3.44092 2 20.8286 19.5153 22.1418 3 22.2468 20.8440 23.6495 Alpha sum is 46.3134 NORMALIZED VALUES: Index, Estimate, Lower Limit, Upper Limit: 1 0.699171E-01 0.655378E-01 0.742963E-01 2 0.449730 0.421375 0.478086 3 0.480353 0.450065 0.510640 Log likelikhood function = 3207.52 TEST10 For a Dirichlet mixture distribution, DIRICHLET_MIX_SAMPLE samples; DIRICHLET_MIX_MEAN computes means; DIRICHLET_MIX_VARIANCE computes variances. Component Weight 1 3.000000 2 2.000000 3 1.000000 Component Parameters Means Variances 1 1 0.050000 0.050000 0.023750 2 0.200000 0.200000 0.080000 3 0.750000 0.750000 0.093750 2 1 0.850000 0.850000 0.063750 2 0.100000 0.100000 0.045000 3 0.050000 0.050000 0.023750 3 1 0.000000 0.000000 0.000000 2 0.500000 0.500000 0.125000 3 0.500000 0.500000 0.125000 Element Mean 1 0.308333 2 0.216667 3 0.475000 Number of samples is 200 First few samples: Sample Component X 1 1 0.000000 0.000313 0.999687 2 1 0.148183 0.205300 0.646517 3 1 0.000000 0.001145 0.998855 4 1 0.000005 0.496951 0.503045 5 1 0.000615 0.906611 0.092774 6 1 0.000000 0.187350 0.812650 7 1 0.000000 0.007653 0.992347 8 1 0.001734 0.711399 0.286867 9 1 0.000000 0.090315 0.909685 10 1 0.041223 0.274302 0.684475 Element Observed mean, variance 1 0.055648 0.028168 2 0.210586 0.077770 3 0.733766 0.092236 ASA266_PRB Normal end of execution. January 13 2008 12:20:43.602 PM