>> clear all >> outline count = 1 outline basic parameters p = 0.0100 0.0050 1.0000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 1.1155e-57 sort and display results true -- lower - expected - upper for lambda1 ans = 0.0100 0.0331 0.0331 0.0331 true -- lower - expected - upper for lambda2 ans = 0.0050 0.0197 0.0197 0.0197 true -- lower - expected - upper for alpha ans = 1.0000 1.4378 1.4378 1.4378 posterior predictive p = 0.0100 0.0050 1.0000 #failed in month I+1, #predicted, 2*SD ans = 45.0000 141.7391 23.5005 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 3.7124e-13 cross val values x_post_sim_cross = 0.0264 0.0088 3.4253 obs(c) - expected value 2*SD ans = 12.0000 43.0618 12.9387 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 2.0455e-34 cross val values x_post_sim_cross = 0.0018 0.0238 0.0000 obs(c) - expected value 2*SD ans = 40.0000 73.9097 16.9809 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 9.3910e-40 cross val values x_post_sim_cross = 0.0569 0.0056 1.1105 obs(c) - expected value 2*SD ans = 31.0000 92.4376 18.8885 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 2.2570e-28 cross val values x_post_sim_cross = 0.0099 0.0224 1.9298 obs(c) - expected value 2*SD ans = 42.0000 115.2669 21.2207 count = 2 outline basic parameters p = 0.0100 0.0050 0.1000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 3.5410e-10 sort and display results true -- lower - expected - upper for lambda1 ans = 0.0100 0.0018 0.0018 0.0018 true -- lower - expected - upper for lambda2 ans = 0.0050 0.0118 0.0118 0.0118 true -- lower - expected - upper for alpha ans = 0.1000 0.0093 0.0093 0.0093 posterior predictive p = 0.0100 0.0050 0.1000 #failed in month I+1, #predicted, 2*SD ans = 78.0000 77.7342 17.5187 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.5942e-09 cross val values x_post_sim_cross = 0.0064 0.0063 0.0007 obs(c) - expected value 2*SD ans = 37.0000 25.1682 9.9702 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 4.8700e-16 cross val values x_post_sim_cross = 0.0496 0.0031 0.8202 obs(c) - expected value 2*SD ans = 46.0000 82.6751 17.8678 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 3.6806e-11 cross val values x_post_sim_cross = 0.0177 0.0100 0.1187 obs(c) - expected value 2*SD ans = 62.0000 94.8215 19.2425 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 9.2724e-13 cross val values x_post_sim_cross = 0.0026 0.0097 4.9193 obs(c) - expected value 2*SD ans = 86.0000 49.4561 13.9948 count = 3 outline basic parameters p = 0.9000 0.0100 0.0100 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 1.3747e-08 sort and display results true -- lower - expected - upper for lambda1 ans = 0.9000 0.0064 0.3036 0.8333 true -- lower - expected - upper for lambda2 ans = 0.0100 0.0355 0.5923 0.8882 true -- lower - expected - upper for alpha ans = 0.0100 0.0013 0.2160 1.0949 posterior predictive p = 0.9000 0.0100 0.0100 #failed in month I+1, #predicted, 2*SD ans = 1.0e+03 * 1.0200 0.9463 0.0496 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.1329e-06 cross val values x_post_sim_cross = 0.3149 0.5590 0.4234 obs(c) - expected value 2*SD ans = 837.0000 777.9135 41.6091 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.0345e-06 cross val values x_post_sim_cross = 0.2464 0.6449 0.5321 obs(c) - expected value 2*SD ans = 922.0000 865.1461 45.8469 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.0336e-06 cross val values x_post_sim_cross = 0.2371 0.6526 0.3853 obs(c) - expected value 2*SD ans = 976.0000 915.8373 47.8836 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 2.2599e-06 cross val values x_post_sim_cross = 0.2346 0.6532 0.5572 obs(c) - expected value 2*SD ans = 948.0000 931.1008 49.3382 count = 4 outline basic parameters p = 0.9000 0.0100 1.0000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 1.9230e-15 sort and display results true -- lower - expected - upper for lambda1 ans = 0.9000 0.8760 0.8759 0.8760 true -- lower - expected - upper for lambda2 ans = 0.0100 0.0419 0.0419 0.0419 true -- lower - expected - upper for alpha ans = 1.0000 1.3955 1.3955 1.3955 posterior predictive p = 0.9000 0.0100 1.0000 #failed in month I+1, #predicted, 2*SD ans = 244.0000 287.5864 32.8919 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.4589e-08 cross val values x_post_sim_cross = 0.8288 0.0035 0.9038 obs(c) - expected value 2*SD ans = 531.0000 533.4697 39.5118 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 6.8277e-08 cross val values x_post_sim_cross = 0.8405 0.0112 0.9548 obs(c) - expected value 2*SD ans = 435.0000 434.8404 38.2836 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 8.3728e-09 cross val values x_post_sim_cross = 0.8720 0.0482 1.1959 obs(c) - expected value 2*SD ans = 326.0000 357.1569 35.7235 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 8.4000e-17 cross val values x_post_sim_cross = 0.7207 0.1095 1.5863 obs(c) - expected value 2*SD ans = 304.0000 425.9082 39.2087 count = 5 outline basic parameters p = 0.1000 0.0500 0.1000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 2.2109e-10 sort and display results true -- lower - expected - upper for lambda1 ans = 0.1000 0.0593 0.0601 0.0593 true -- lower - expected - upper for lambda2 ans = 0.0500 0.0755 0.0762 0.0755 true -- lower - expected - upper for alpha ans = 0.1000 0.0288 0.0617 0.0288 posterior predictive p = 0.1000 0.0500 0.1000 #failed in month I+1, #predicted, 2*SD ans = 534.0000 527.6938 43.7998 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 2.5179e-08 cross val values x_post_sim_cross = 0.0073 0.1153 1.6174 obs(c) - expected value 2*SD ans = 268.0000 212.2310 27.5446 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.7229e-10 cross val values x_post_sim_cross = 0.0599 0.0753 0.2386 obs(c) - expected value 2*SD ans = 324.0000 304.8898 33.0971 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 6.1022e-09 cross val values x_post_sim_cross = 0.0178 0.1218 4.6140 obs(c) - expected value 2*SD ans = 409.0000 391.9149 37.5771 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 4.6424e-08 cross val values x_post_sim_cross = 0.0462 0.0977 0.3575 obs(c) - expected value 2*SD ans = 449.0000 446.0182 40.2870 count = 6 outline basic parameters p = 0.1000 0.0500 3.0000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 8.9765e-10 sort and display results true -- lower - expected - upper for lambda1 ans = 0.1000 0.0772 0.0772 0.0772 true -- lower - expected - upper for lambda2 ans = 0.0500 0.0477 0.0477 0.0477 true -- lower - expected - upper for alpha ans = 3.0000 1.8609 1.8609 1.8609 posterior predictive p = 0.1000 0.0500 3.0000 #failed in month I+1, #predicted, 2*SD ans = 320.0000 283.6200 32.8575 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 6.0612e-08 cross val values x_post_sim_cross = 0.1321 0.0391 2.4678 obs(c) - expected value 2*SD ans = 145.0000 181.6352 25.4284 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 8.4616e-09 cross val values x_post_sim_cross = 0.0606 0.0547 2.2127 obs(c) - expected value 2*SD ans = 202.0000 196.4125 27.0472 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 3.7418e-13 cross val values x_post_sim_cross = 0.0397 0.0663 1.0071 obs(c) - expected value 2*SD ans = 237.0000 269.4643 31.7027 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.2819e-08 cross val values x_post_sim_cross = 0.1203 0.0436 3.3216 obs(c) - expected value 2*SD ans = 262.0000 241.9248 30.2708 count = 7 outline basic parameters p = 0.6000 0.1000 0 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 3.8507e-09 sort and display results true -- lower - expected - upper for lambda1 ans = 0.6000 0.0095 0.2991 0.6339 true -- lower - expected - upper for lambda2 ans = 0.1000 0.0861 0.4152 0.7225 true -- lower - expected - upper for alpha ans = 0 0.0000 0.3063 1.9182 posterior predictive p = 0.6000 0.1000 0 #failed in month I+1, #predicted, 2*SD ans = 1.0e+03 * 1.0000 0.8913 0.0514 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 4.3630e-07 cross val values x_post_sim_cross = 0.2288 0.4944 0.4338 obs(c) - expected value 2*SD ans = 736.0000 723.8816 41.7957 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 7.7641e-07 cross val values x_post_sim_cross = 0.1499 0.5515 1.2154 obs(c) - expected value 2*SD ans = 904.0000 802.8213 46.4797 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 3.3542e-07 cross val values x_post_sim_cross = 0.1933 0.5138 0.5955 obs(c) - expected value 2*SD ans = 925.0000 861.1585 49.0732 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 3.7509e-07 cross val values x_post_sim_cross = 0.1508 0.5627 0.5183 obs(c) - expected value 2*SD ans = 985.0000 919.5419 50.6137 count = 8 outline basic parameters p = 10.0000 5.0000 0.1000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 7.6964e+13 sort and display results true -- lower - expected - upper for lambda1 ans = 10.0000 0.9549 8.1059 16.5118 true -- lower - expected - upper for lambda2 ans = 5.0000 2.8672 11.4639 18.4754 true -- lower - expected - upper for alpha ans = 0.1000 0.0000 0.1292 0.4166 posterior predictive p = 10.0000 5.0000 0.1000 #failed in month I+1, #predicted, 2*SD ans = 1.0e+03 * 1.0000 1.0000 0.0000 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 5.3274e+11 cross val values x_post_sim_cross = 7.7219 11.7435 0.1855 obs(c) - expected value 2*SD ans = 1.0e+03 * 1.0000 1.0000 0.0000 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 5.6055e+11 cross val values x_post_sim_cross = 7.3918 12.0653 0.2048 obs(c) - expected value 2*SD ans = 1.0e+03 * 1.0000 1.0000 0.0000 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 6.3528e+11 cross val values x_post_sim_cross = 7.5319 11.8943 0.1807 obs(c) - expected value 2*SD ans = 1.0e+03 * 1.0000 1.0000 0.0000 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 7.0435e+11 cross val values x_post_sim_cross = 7.9464 11.5142 0.1629 obs(c) - expected value 2*SD ans = 1.0e+03 * 1.0000 1.0000 0.0000 count = 9 outline basic parameters p = 10 5 5 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 1.4199 sort and display results true -- lower - expected - upper for lambda1 ans = 10.0000 5.7565 11.6190 14.5978 true -- lower - expected - upper for lambda2 ans = 5.0000 4.4084 5.1332 5.7973 true -- lower - expected - upper for alpha ans = 5.0000 2.4190 4.7555 8.9969 posterior predictive p = 10 5 5 #failed in month I+1, #predicted, 2*SD ans = 998.0000 1000.0000 6.8486 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 32.4162 cross val values x_post_sim_cross = 12.1591 5.0197 3.6511 obs(c) - expected value 2*SD ans = 995.0000 995.1817 4.3796 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 29.0111 cross val values x_post_sim_cross = 12.4886 4.6369 3.6778 obs(c) - expected value 2*SD ans = 1.0e+03 * 1.0010 0.9974 0.0081 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 47.1805 cross val values x_post_sim_cross = 11.8173 5.2981 5.3707 obs(c) - expected value 2*SD ans = 995.0000 999.9960 6.3082 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 20.2518 cross val values x_post_sim_cross = 11.9721 5.1035 4.8081 obs(c) - expected value 2*SD ans = 1.0e+03 * 1.0030 1.0000 0.0070 count = 10 outline basic parameters p = 0.3000 0.0500 0.1000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 1.5245e-09 sort and display results true -- lower - expected - upper for lambda1 ans = 0.3000 0.0618 0.0711 0.1205 true -- lower - expected - upper for lambda2 ans = 0.0500 0.2940 0.2874 0.2978 true -- lower - expected - upper for alpha ans = 0.1000 2.6797 2.5964 3.2058 posterior predictive p = 0.3000 0.0500 0.1000 #failed in month I+1, #predicted, 2*SD ans = 764.0000 812.0805 51.9611 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 6.7842e-08 cross val values x_post_sim_cross = 0.0536 0.2968 4.2258 obs(c) - expected value 2*SD ans = 465.0000 465.6367 37.7369 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 2.8631e-07 cross val values x_post_sim_cross = 0.0935 0.2617 2.4126 obs(c) - expected value 2*SD ans = 573.0000 558.4691 42.4707 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 2.7268e-08 cross val values x_post_sim_cross = 0.1052 0.2399 0.6860 obs(c) - expected value 2*SD ans = 692.0000 647.9770 46.2629 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 4.3000e-07 cross val values x_post_sim_cross = 0.1040 0.2606 1.0861 obs(c) - expected value 2*SD ans = 767.0000 723.6594 49.1296 >>