Chapter 7 - Ulysses’ Compass

This week began with the problem of overfitting, a universal phenomenon by which models with more parameters fit a sample better, even when the additional parameters are meaningless. Two common tools were introduced to address overfitting: regularizing priors and estimates of out-of-sample accuracy (WAIC and PSIS). Regularizing priors reduce overfitting during estimation, and WAIC and PSIS help estimate the degree of overfitting. Practical functions compare in the rethinking package were introduced to help analyze collections of models fit to the same data. If you are after causal estimates, then these tools will mislead you. So models must be designed through some other method, not selected on the basis of out-of-sample predictive accuracy. But any causal estimate will still overfit the sample. So you always have to worry about overfitting, measuring it with WAIC/PSIS and reducing it with regularization.

Place each answer inside the code chunk (grey box). The code chunks should contain a text response or a code that completes/answers the question or activity requested. Make sure to include plots if the question requests them.

Finally, upon completion, name your final output .html file as: YourName_ANLY505-Year-Semester.html and publish the assignment to your R Pubs account and submit the link to Canvas. Each question is worth 5 points.

Questions

7-1. When comparing models with an information criterion, why must all models be fit to exactly the same observations? What would happen to the information criterion values, if the models were fit to different numbers of observations? Perform some simulations.

data(Howell1)
d = Howell1[complete.cases(Howell1), ]
d_500 = d[sample(1:nrow(d), size = 500, replace = FALSE), ]
d_400 = d[sample(1:nrow(d), size = 400, replace = FALSE), ]
d_300 = d[sample(1:nrow(d), size = 300, replace = FALSE), ]

m_500 = quap(
  alist(
    height ~ dnorm(mu, sigma),
    mu <- a + b * log(weight)
  ),
data = d_500,
  start = list(a = mean(d_500$height), b = 0, sigma = sd(d_500$height))
)

m_400 = quap(
  alist(
    height ~ dnorm(mu, sigma),
    mu <- a + b * log(weight)
  ),
data = d_400,
  start = list(a = mean(d_400$height), b = 0, sigma = sd(d_400$height))
)

m_300 = quap(
  alist(
    height ~ dnorm(mu, sigma),
    mu <- a + b * log(weight)
  ),
  data = d_300,
  start = list(a = mean(d_300$height), b = 0, sigma = sd(d_300$height))
)

(model.compare = compare(m_500, m_400, m_300))
##           WAIC       SE     dWAIC      dSE    pWAIC        weight
## m_300 1846.918 30.08244    0.0000       NA 3.464280  1.000000e+00
## m_400 2442.033 33.49658  595.1149 49.20764 3.325174 5.921665e-130
## m_500 3068.314 35.61066 1221.3967 54.13279 3.281983 5.985294e-266
#A model with more observations tend to have higher deviance and worse 
#accuracy according to the information criterion. According to the 3 models 
#with 200, 300 and 400 observations, it shows that the WAIC increases 
#along with the number of observations.

7-2. What happens to the effective number of parameters, as measured by PSIS or WAIC, as a prior becomes more concentrated? Why? Perform some simulations (at least 4).

d = Howell1[complete.cases(Howell1), ]

d$height.log = log(d$height)
d$height.log.z = (d$height.log - mean(d$height.log)) / sd(d$height.log)
d$weight.log = log(d$weight)
d$weight.log.z = (d$weight.log - mean(d$weight.log)) / sd(d$weight.log)

m_wide = quap(
  alist(
    height.log.z ~ dnorm(mu, sigma),
    mu <- a + b * weight.log.z,
    a ~ dnorm(0, 10),
    b ~ dnorm(1, 10),
    sigma ~ dunif(0, 10)
  ),
data = d )

m_narrow = quap(
  alist(
    height.log.z ~ dnorm(mu, sigma),
    mu <- a + b * weight.log.z,
    a ~ dnorm(0, 0.10),
    b ~ dnorm(1, 0.10),
    sigma ~ dunif(0, 1)
  ),
data = d )

WAIC(m_wide, refresh = 0)
##        WAIC     lppd  penalty  std_err
## 1 -102.6587 55.64129 4.311925 36.48315
WAIC(m_narrow, refresh = 0)
##        WAIC     lppd  penalty  std_err
## 1 -102.7126 55.63829 4.281981 36.67874
#For PSIS: the model becomes less flexible as the prior become more 
#concentrated on certain prior assumptions. And for WAIC: there is a 
#measure of the variance in the log-likelihood for each observation in 
#the training date.  

7-3. Consider three fictional Polynesian islands. On each there is a Royal Ornithologist charged by the king with surveying the bird population. They have each found the following proportions of 5 important bird species:

height weight age male height.log height.log.z weight.log weight.log.z
151.7650 47.825606 63.00 1 5.022333 0.4910353 3.867561 0.7383006
139.7000 36.485807 63.00 0 4.939497 0.1484141 3.596923 0.2684103
136.5250 31.864838 65.00 0 4.916508 0.0533263 3.461503 0.0332893
156.8450 53.041914 41.00 1 5.055258 0.6272167 3.971082 0.9180376
145.4150 41.276872 51.00 0 4.979592 0.3142503 3.720302 0.4826249
163.8300 62.992589 35.00 1 5.098829 0.8074334 4.143017 1.2165561
149.2250 38.243476 32.00 0 5.005455 0.4212254 3.643973 0.3500994
168.9100 55.479971 27.00 1 5.129366 0.9337375 4.016022 0.9960632
147.9550 34.869885 19.00 0 4.996908 0.3858736 3.551624 0.1897593
165.1000 54.487739 54.00 1 5.106551 0.8393729 3.997976 0.9647305
154.3050 49.895120 47.00 0 5.038931 0.5596864 3.909923 0.8118509
151.1300 41.220173 66.00 1 5.018140 0.4736930 3.718928 0.4802384
144.7800 36.032215 73.00 0 4.975215 0.2961490 3.584413 0.2466901
149.9000 47.700000 20.00 0 5.009968 0.4398925 3.864931 0.7337346
150.4950 33.849303 65.30 0 5.013930 0.4562776 3.521918 0.1381843
163.1950 48.562694 36.00 1 5.094946 0.7913707 3.882856 0.7648553
157.4800 42.325803 44.00 1 5.059298 0.6439284 3.745397 0.5261950
143.9418 38.356873 31.00 0 4.969409 0.2721334 3.646934 0.3552400
121.9200 19.617854 12.00 1 4.803365 -0.4146473 2.976440 -0.8088931
105.4100 13.947954 8.00 0 4.657858 -1.0164868 2.635333 -1.4011346
86.3600 10.489315 6.50 0 4.458525 -1.8409552 2.350357 -1.8959188
161.2900 48.987936 39.00 1 5.083204 0.7428050 3.891574 0.7799925
156.2100 42.722696 29.00 0 5.051201 0.6104372 3.754730 0.5423999
129.5400 23.586784 13.00 1 4.863990 -0.1638955 3.160687 -0.4889983
109.2200 15.989118 7.00 0 4.693364 -0.8696262 2.771908 -1.1640077
146.4000 35.493574 56.00 1 4.986343 0.3421729 3.569352 0.2205394
148.5900 37.903281 45.00 0 5.001191 0.4035872 3.635038 0.3345857
147.3200 35.465224 19.00 0 4.992607 0.3680837 3.568553 0.2191521
137.1600 27.328918 17.00 1 4.921148 0.0725195 3.307945 -0.2333227
125.7300 22.679600 16.00 0 4.834137 -0.2873715 3.121466 -0.5570946
114.3000 17.860185 11.00 1 4.738827 -0.6815876 2.882574 -0.9718665
147.9550 40.312989 29.00 1 4.996908 0.3858736 3.696674 0.4416002
161.9250 55.111428 30.00 1 5.087133 0.7590570 4.009357 0.9844913
146.0500 37.506388 24.00 0 4.983949 0.3322727 3.624511 0.3163094
146.0500 38.498621 35.00 0 4.983949 0.3322727 3.650622 0.3616444
152.7048 46.606578 33.00 0 5.028507 0.5165692 3.841742 0.6934719
142.8750 38.838815 27.00 0 4.961970 0.2413650 3.659420 0.3769193
142.8750 35.578623 32.00 0 4.961970 0.2413650 3.571745 0.2246948
147.9550 47.400364 36.00 0 4.996908 0.3858736 3.858630 0.7227938
160.6550 47.882306 24.00 1 5.079259 0.7264888 3.868746 0.7403577
151.7650 49.413179 30.00 1 5.022333 0.4910353 3.900217 0.7949989
162.8648 49.384829 24.00 1 5.092920 0.7829934 3.899643 0.7940025
171.4500 56.557252 52.00 1 5.144292 0.9954721 4.035253 1.0294534
147.3200 39.122310 42.00 0 4.992607 0.3680837 3.666693 0.3895465
147.9550 49.895120 19.00 0 4.996908 0.3858736 3.909923 0.8118509
144.7800 28.803092 17.00 0 4.975215 0.2961490 3.360483 -0.1421056
121.9200 20.411640 8.00 1 4.803365 -0.4146473 3.016105 -0.7400250
128.9050 23.359988 12.00 0 4.859076 -0.1842206 3.151025 -0.5057736
97.7900 13.267566 5.00 0 4.582822 -1.3268427 2.585322 -1.4879644
154.3050 41.248522 55.00 1 5.038931 0.5596864 3.719615 0.4814321
143.5100 38.555320 43.00 0 4.966405 0.2597071 3.652094 0.3641996
146.7000 42.400000 20.00 1 4.988390 0.3506399 3.747148 0.5292359
157.4800 44.650463 18.00 1 5.059298 0.6439284 3.798865 0.6190274
127.0000 22.010552 13.00 1 4.844187 -0.2458019 3.091522 -0.6090841
110.4900 15.422128 9.00 0 4.704925 -0.8218091 2.735803 -1.2266944
97.7900 12.757275 5.00 0 4.582822 -1.3268427 2.546102 -1.5560607
165.7350 58.598416 42.00 1 5.110390 0.8552506 4.070708 1.0910102
152.4000 46.719976 44.00 0 5.026509 0.5083052 3.844172 0.6976912
141.6050 44.225220 60.00 0 4.953042 0.2044349 3.789295 0.6024126
158.8000 50.900000 20.00 0 5.067646 0.6784531 3.929863 0.8464709
155.5750 54.317642 37.00 0 5.047128 0.5935894 3.994849 0.9593020
164.4650 45.897841 50.00 1 5.102698 0.8234340 3.826418 0.6668665
151.7650 48.024053 50.00 0 5.022333 0.4910353 3.871702 0.7454900
161.2900 52.219779 31.00 1 5.083204 0.7428050 3.955461 0.8909157
154.3050 47.627160 25.00 0 5.038931 0.5596864 3.863403 0.7310813
145.4150 45.642695 23.00 0 4.979592 0.3142503 3.820844 0.6571879
145.4150 42.410852 52.00 0 4.979592 0.3142503 3.747404 0.5296802
152.4000 36.485807 79.30 1 5.026509 0.5083052 3.596923 0.2684103
163.8300 55.933563 35.00 1 5.098829 0.8074334 4.024165 1.0102006
144.1450 37.194544 27.00 0 4.970820 0.2779682 3.616162 0.3018132
129.5400 24.550667 13.00 1 4.863990 -0.1638955 3.200739 -0.4194579
129.5400 25.627948 14.00 0 4.863990 -0.1638955 3.243683 -0.3448963
153.6700 48.307548 38.00 1 5.034807 0.5426302 3.877588 0.7557091
142.8750 37.336292 39.00 0 4.961970 0.2413650 3.619966 0.3084174
146.0500 29.596878 12.00 0 4.983949 0.3322727 3.387669 -0.0949042
167.0050 47.173568 30.00 1 5.118024 0.8868243 3.853834 0.7144665
158.4198 47.286966 24.00 0 5.065249 0.6685385 3.856235 0.7186352
91.4400 12.927372 0.60 1 4.515683 -1.6045401 2.559347 -1.5330639
165.7350 57.549485 51.00 1 5.110390 0.8552506 4.052645 1.0596495
149.8600 37.931631 46.00 0 5.009702 0.4387886 3.635785 0.3358838
147.9550 41.900561 17.00 0 4.996908 0.3858736 3.735299 0.5086630
137.7950 27.584063 12.00 0 4.925767 0.0916241 3.317238 -0.2171882
154.9400 47.201918 22.00 0 5.043038 0.5766727 3.854434 0.7155096
160.9598 43.204638 29.00 1 5.081155 0.7343286 3.765948 0.5618762
161.9250 50.263663 38.00 1 5.087133 0.7590570 3.917282 0.8246282
147.9550 39.377456 30.00 0 4.996908 0.3858736 3.673194 0.4008330
113.6650 17.463292 6.00 1 4.733256 -0.7046302 2.860101 -1.0108847
159.3850 50.689000 45.00 1 5.071323 0.6936621 3.925709 0.8392586
148.5900 39.434154 47.00 0 5.001191 0.4035872 3.674632 0.4033311
136.5250 36.287360 79.00 0 4.916508 0.0533263 3.591470 0.2589411
158.1150 46.266384 45.00 1 5.063323 0.6605729 3.834416 0.6807522
144.7800 42.269104 54.00 0 4.975215 0.2961490 3.744056 0.5238676
156.8450 47.627160 31.00 1 5.055258 0.6272167 3.863403 0.7310813
179.0700 55.706767 23.00 1 5.187777 1.1753325 4.020102 1.0031463
118.7450 18.824068 9.00 0 4.776978 -0.5237866 2.935136 -0.8806061
170.1800 48.562694 41.00 1 5.136857 0.9647200 3.882856 0.7648553
146.0500 42.807745 23.00 0 4.983949 0.3322727 3.756719 0.5458528
147.3200 35.068331 36.00 0 4.992607 0.3680837 3.557298 0.1996123
113.0300 17.888534 5.00 1 4.727653 -0.7278019 2.884160 -0.9691128
162.5600 56.755699 30.00 0 5.091047 0.7752454 4.038756 1.0355347
133.9850 27.442316 12.00 1 4.897728 -0.0243499 3.312086 -0.2261333
152.4000 51.255896 34.00 0 5.026509 0.5083052 3.936831 0.8585685
160.0200 47.230267 44.00 1 5.075299 0.7101080 3.855035 0.7165521
149.8600 40.936678 43.00 0 5.009702 0.4387886 3.712026 0.4682560
142.8750 32.715323 73.30 0 4.961970 0.2413650 3.487844 0.0790224
167.0050 57.067543 38.00 1 5.118024 0.8868243 4.044236 1.0450484
159.3850 42.977842 43.00 1 5.071323 0.6936621 3.760685 0.5527381
154.9400 39.944446 33.00 0 5.043038 0.5766727 3.687490 0.4256544
148.5900 32.460178 16.00 0 5.001191 0.4035872 3.480014 0.0654285
111.1250 17.123098 11.00 1 4.710656 -0.7981062 2.840428 -1.0450412
111.7600 16.499409 6.00 1 4.716354 -0.7745384 2.803325 -1.1094619
162.5600 45.954540 35.00 1 5.091047 0.7752454 3.827653 0.6690100
152.4000 41.106775 29.00 0 5.026509 0.5083052 3.716173 0.4754554
124.4600 18.257078 12.00 0 4.823984 -0.3293631 2.904553 -0.9337061
111.7600 15.081934 9.00 1 4.716354 -0.7745384 2.713498 -1.2654224
86.3600 11.481547 7.60 1 4.458525 -1.8409552 2.440741 -1.7389910
170.1800 47.598810 58.00 1 5.136857 0.9647200 3.862808 0.7300475
146.0500 37.506388 53.00 0 4.983949 0.3322727 3.624511 0.3163094
159.3850 45.019006 51.00 1 5.071323 0.6936621 3.807085 0.6332994
151.1300 42.269104 48.00 0 5.018140 0.4736930 3.744056 0.5238676
160.6550 54.856282 29.00 1 5.079259 0.7264888 4.004717 0.9764345
169.5450 53.523856 41.00 1 5.133118 0.9492578 3.980128 0.9337418
158.7500 52.191429 81.75 1 5.067331 0.6771506 3.954918 0.8899728
74.2950 9.752228 1.00 1 4.308044 -2.4633652 2.277496 -2.0224231
149.8600 42.410852 35.00 0 5.009702 0.4387886 3.747404 0.5296802
153.0350 49.583275 46.00 0 5.030667 0.5255033 3.903654 0.8009654
96.5200 13.097469 5.00 1 4.569750 -1.3809106 2.572419 -1.5103677
161.9250 41.730464 29.00 1 5.087133 0.7590570 3.731231 0.5016004
162.5600 56.018612 42.00 1 5.091047 0.7752454 4.025684 1.0128386
149.2250 42.155707 27.00 0 5.005455 0.4212254 3.741370 0.5192034
116.8400 19.391058 8.00 0 4.760806 -0.5906798 2.964812 -0.8290821
100.0760 15.081934 6.00 1 4.605930 -1.2312666 2.713498 -1.2654224
163.1950 53.098613 22.00 1 5.094946 0.7913707 3.972151 0.9198925
161.9250 50.235314 43.00 1 5.087133 0.7590570 3.916718 0.8236487
145.4150 42.524250 53.00 0 4.979592 0.3142503 3.750075 0.5343163
163.1950 49.101334 43.00 1 5.094946 0.7913707 3.893886 0.7840069
151.1300 38.498621 41.00 0 5.018140 0.4736930 3.650622 0.3616444
150.4950 49.810071 50.00 0 5.013930 0.4562776 3.908217 0.8088889
141.6050 29.313383 15.00 1 4.953042 0.2044349 3.378044 -0.1116149
170.8150 59.760746 33.00 1 5.140581 0.9801246 4.090349 1.1251121
91.4400 11.708343 3.00 0 4.515683 -1.6045401 2.460302 -1.7050294
157.4800 47.939005 62.00 1 5.059298 0.6439284 3.869930 0.7424125
152.4000 39.292407 49.00 0 5.026509 0.5083052 3.671031 0.3970789
149.2250 38.130077 17.00 1 5.005455 0.4212254 3.641003 0.3449435
129.5400 21.999212 12.00 0 4.863990 -0.1638955 3.091007 -0.6099789
147.3200 36.882700 22.00 0 4.992607 0.3680837 3.607743 0.2871950
145.4150 42.127357 29.00 0 4.979592 0.3142503 3.740697 0.5180354
121.9200 19.787951 8.00 0 4.803365 -0.4146473 2.985073 -0.7939039
113.6650 16.782904 5.00 1 4.733256 -0.7046302 2.820361 -1.0798831
157.4800 44.565414 33.00 1 5.059298 0.6439284 3.796958 0.6157172
154.3050 47.853956 34.00 0 5.038931 0.5596864 3.868154 0.7393295
120.6500 21.177076 12.00 0 4.792894 -0.4579581 3.052919 -0.6761073
115.6000 18.900000 7.00 1 4.750136 -0.6348104 2.939162 -0.8736166
167.0050 55.196477 42.00 1 5.118024 0.8868243 4.010899 0.9871686
142.8750 32.998818 40.00 0 4.961970 0.2413650 3.496472 0.0940029
152.4000 40.879979 27.00 0 5.026509 0.5083052 3.710640 0.4658496
96.5200 13.267566 3.00 0 4.569750 -1.3809106 2.585322 -1.4879644
160.0000 51.200000 25.00 1 5.075174 0.7095911 3.935739 0.8566741
159.3850 49.044635 29.00 1 5.071323 0.6936621 3.892731 0.7820009
149.8600 53.438808 45.00 0 5.009702 0.4387886 3.978537 0.9309808
160.6550 54.090846 26.00 1 5.079259 0.7264888 3.990665 0.9520374
160.6550 55.366574 45.00 1 5.079259 0.7264888 4.013976 0.9925108
149.2250 42.240755 45.00 0 5.005455 0.4212254 3.743386 0.5227027
125.0950 22.367756 11.00 0 4.829073 -0.3083140 3.107620 -0.5811334
140.9700 40.936678 85.60 0 4.948547 0.1858455 3.712026 0.4682560
154.9400 49.696674 26.00 1 5.043038 0.5766727 3.905938 0.8049317
141.6050 44.338618 24.00 0 4.953042 0.2044349 3.791856 0.6068588
160.0200 45.954540 57.00 1 5.075299 0.7101080 3.827653 0.6690100
150.1648 41.957260 22.00 0 5.011733 0.4471926 3.736651 0.5110109
155.5750 51.482692 24.00 0 5.047128 0.5935894 3.941246 0.8662340
103.5050 12.757275 6.00 0 4.639620 -1.0919200 2.546102 -1.5560607
94.6150 13.012420 4.00 0 4.549816 -1.4633613 2.565904 -1.5216787
156.2100 44.111822 21.00 0 5.051201 0.6104372 3.786728 0.5979550
153.0350 32.205032 79.00 0 5.030667 0.5255033 3.472123 0.0517273
167.0050 56.755699 50.00 1 5.118024 0.8868243 4.038756 1.0355347
149.8600 52.673371 40.00 0 5.009702 0.4387886 3.964110 0.9059318
147.9550 36.485807 64.00 0 4.996908 0.3858736 3.596923 0.2684103
159.3850 48.846188 32.00 1 5.071323 0.6936621 3.888676 0.7749614
161.9250 56.954146 38.70 1 5.087133 0.7590570 4.042247 1.0415949
155.5750 42.099007 26.00 0 5.047128 0.5935894 3.740024 0.5168666
159.3850 50.178615 63.00 1 5.071323 0.6936621 3.915589 0.8216879
146.6850 46.549879 62.00 0 4.988287 0.3502170 3.840524 0.6913584
172.7200 61.801910 22.00 1 5.151672 1.0259972 4.123934 1.1834239
166.3700 48.987936 41.00 1 5.114214 0.8710676 3.891574 0.7799925
141.6050 31.524644 19.00 1 4.953042 0.2044349 3.450770 0.0146534
142.8750 32.205032 17.00 0 4.961970 0.2413650 3.472123 0.0517273
133.3500 23.756881 14.00 0 4.892977 -0.0439991 3.167872 -0.4765223
127.6350 24.408919 9.00 1 4.849175 -0.2251728 3.194949 -0.4295114
119.3800 21.517270 7.00 1 4.782312 -0.5017272 3.068856 -0.6484377
151.7650 35.295127 74.00 0 5.022333 0.4910353 3.563745 0.2108048
156.8450 45.642695 41.00 1 5.055258 0.6272167 3.820844 0.6571879
148.5900 43.885026 33.00 0 5.001191 0.4035872 3.781573 0.5890054
157.4800 45.557646 53.00 0 5.059298 0.6439284 3.818979 0.6539497
149.8600 39.008912 18.00 0 5.009702 0.4387886 3.663790 0.3845066
147.9550 41.163474 37.00 0 4.996908 0.3858736 3.717551 0.4778485
102.2350 13.125818 6.00 0 4.627274 -1.1429841 2.574581 -1.5066137
153.0350 45.245802 61.00 0 5.030667 0.5255033 3.812110 0.6420242
160.6550 53.637254 44.00 1 5.079259 0.7264888 3.982244 0.9374164
149.2250 52.304828 35.00 0 5.005455 0.4212254 3.957089 0.8937411
114.3000 18.342126 7.00 1 4.738827 -0.6815876 2.909200 -0.9256368
100.9650 13.749507 4.00 1 4.614774 -1.1946865 2.621003 -1.4260146
138.4300 39.093961 23.00 0 4.930365 0.1106409 3.665968 0.3882879
91.4400 12.530479 4.00 1 4.515683 -1.6045401 2.528164 -1.5872047
162.5600 45.699394 55.00 1 5.091047 0.7752454 3.822085 0.6593434
149.2250 40.398038 53.00 0 5.005455 0.4212254 3.698781 0.4452592
158.7500 51.482692 59.00 1 5.067331 0.6771506 3.941246 0.8662340
149.8600 38.668718 57.00 0 5.009702 0.4387886 3.655031 0.3692986
158.1150 39.235708 35.00 1 5.063323 0.6605729 3.669587 0.3945717
156.2100 44.338618 29.00 0 5.051201 0.6104372 3.791856 0.6068588
148.5900 39.519203 62.00 1 5.001191 0.4035872 3.676787 0.4070717
143.5100 31.071052 18.00 0 4.966405 0.2597071 3.436277 -0.0105099
154.3050 46.776675 51.00 0 5.038931 0.5596864 3.845385 0.6997970
131.4450 22.509503 14.00 0 4.878589 -0.1035129 3.113938 -0.5701654
157.4800 40.624834 19.00 1 5.059298 0.6439284 3.704379 0.4549793
157.4800 50.178615 42.00 1 5.059298 0.6439284 3.915589 0.8216879
154.3050 41.276872 25.00 0 5.038931 0.5596864 3.720302 0.4826249
107.9500 17.576690 6.00 1 4.681668 -0.9180027 2.866574 -0.9996469
168.2750 54.600000 41.00 1 5.125599 0.9181588 4.000034 0.9683040
145.4150 44.990657 37.00 0 4.979592 0.3142503 3.806455 0.6322057
147.9550 44.735511 16.00 0 4.996908 0.3858736 3.800768 0.6223314
100.9650 14.401546 5.00 1 4.614774 -1.1946865 2.667336 -1.3455705
113.0300 19.050864 9.00 1 4.727653 -0.7278019 2.947112 -0.8598127
149.2250 35.805419 82.00 1 5.005455 0.4212254 3.578099 0.2357273
154.9400 45.217453 28.00 1 5.043038 0.5766727 3.811483 0.6409360
162.5600 48.109102 50.00 1 5.091047 0.7752454 3.873471 0.7485620
156.8450 45.671045 43.00 0 5.055258 0.6272167 3.821464 0.6582660
123.1900 20.808533 8.00 1 4.813728 -0.3717854 3.035363 -0.7065889
161.0106 48.420946 31.00 1 5.081470 0.7356338 3.879932 0.7597800
144.7800 41.191823 67.00 0 4.975215 0.2961490 3.718240 0.4790439
143.5100 38.413573 39.00 0 4.966405 0.2597071 3.648411 0.3578046
149.2250 42.127357 18.00 0 5.005455 0.4212254 3.740697 0.5180354
110.4900 17.661738 11.00 0 4.704925 -0.8218091 2.871401 -0.9912660
149.8600 38.243476 48.00 0 5.009702 0.4387886 3.643973 0.3500994
165.7350 48.335898 30.00 1 5.110390 0.8552506 3.878175 0.7567278
144.1450 38.923864 64.00 0 4.970820 0.2779682 3.661608 0.3807171
157.4800 40.029494 72.00 1 5.059298 0.6439284 3.689617 0.4293472
154.3050 50.206964 68.00 0 5.038931 0.5596864 3.916154 0.8226686
163.8300 54.289293 44.00 1 5.098829 0.8074334 3.994327 0.9583956
156.2100 45.600000 43.00 0 5.051201 0.6104372 3.819908 0.6555631
153.6700 40.766581 16.00 0 5.034807 0.5426302 3.707863 0.4610268
134.6200 27.130471 13.00 0 4.902456 -0.0047937 3.300657 -0.2459762
144.1450 39.434154 34.00 0 4.970820 0.2779682 3.674632 0.4033311
114.3000 20.496689 10.00 0 4.738827 -0.6815876 3.020263 -0.7328057
162.5600 43.204638 62.00 1 5.091047 0.7752454 3.765948 0.5618762
146.0500 31.864838 44.00 0 4.983949 0.3322727 3.461503 0.0332893
120.6500 20.893581 11.00 1 4.792894 -0.4579581 3.039442 -0.6995071
154.9400 45.444249 31.00 1 5.043038 0.5766727 3.816486 0.6496226
144.7800 38.045029 29.00 0 4.975215 0.2961490 3.638770 0.3410666
106.6800 15.989118 8.00 0 4.669834 -0.9669516 2.771908 -1.1640077
146.6850 36.088913 62.00 0 4.988287 0.3502170 3.585986 0.2494200
152.4000 40.879979 67.00 0 5.026509 0.5083052 3.710640 0.4658496
163.8300 47.910655 57.00 1 5.098829 0.8074334 3.869338 0.7413854
165.7350 47.712209 32.00 1 5.110390 0.8552506 3.865187 0.7341790
156.2100 46.379782 24.00 0 5.051201 0.6104372 3.836864 0.6850025
152.4000 41.163474 77.00 1 5.026509 0.5083052 3.717551 0.4778485
140.3350 36.599204 62.00 0 4.944032 0.1671721 3.600026 0.2737981
158.1150 43.091240 17.00 1 5.063323 0.6605729 3.763320 0.5573131
163.1950 48.137451 67.00 1 5.094946 0.7913707 3.874061 0.7495849
151.1300 36.712603 70.00 0 5.018140 0.4736930 3.603120 0.2791693
171.1198 56.557252 37.00 1 5.142364 0.9874985 4.035253 1.0294534
149.8600 38.697068 58.00 0 5.009702 0.4387886 3.655764 0.3705711
163.8300 47.485413 35.00 1 5.098829 0.8074334 3.860423 0.7259063
141.6050 36.202312 30.00 0 4.953042 0.2044349 3.589123 0.2548670
93.9800 14.288148 5.00 0 4.543082 -1.4912142 2.659430 -1.3592957
149.2250 41.276872 26.00 0 5.005455 0.4212254 3.720302 0.4826249
105.4100 15.223681 5.00 0 4.657858 -1.0164868 2.722852 -1.2491806
146.0500 44.763860 21.00 0 4.983949 0.3322727 3.801401 0.6234313
161.2900 50.433760 41.00 1 5.083204 0.7428050 3.920661 0.8304939
162.5600 55.281525 46.00 1 5.091047 0.7752454 4.012439 0.9898418
145.4150 37.931631 49.00 0 4.979592 0.3142503 3.635785 0.3358838
145.4150 35.493574 15.00 1 4.979592 0.3142503 3.569352 0.2205394
170.8150 58.456669 28.00 1 5.140581 0.9801246 4.068286 1.0868052
127.0000 21.488921 12.00 0 4.844187 -0.2458019 3.067537 -0.6507267
159.3850 44.423667 83.00 0 5.071323 0.6936621 3.793772 0.6101860
159.4000 44.400000 54.00 1 5.071417 0.6940514 3.793239 0.6092608
153.6700 44.565414 54.00 0 5.034807 0.5426302 3.796958 0.6157172
160.0200 44.622113 68.00 1 5.075299 0.7101080 3.798230 0.6179247
150.4950 40.483086 68.00 0 5.013930 0.4562776 3.700884 0.4489106
149.2250 44.083472 56.00 0 5.005455 0.4212254 3.786085 0.5968388
127.0000 24.408919 15.00 0 4.844187 -0.2458019 3.194949 -0.4295114
142.8750 34.416293 57.00 0 4.961970 0.2413650 3.538530 0.1670260
142.1130 32.772022 22.00 0 4.956622 0.2192465 3.489575 0.0820289
147.3200 35.947166 40.00 0 4.992607 0.3680837 3.582050 0.2425871
162.5600 49.554900 19.00 1 5.091047 0.7752454 3.903081 0.7999715
164.4650 53.183662 41.00 1 5.102698 0.8234340 3.973751 0.9226712
160.0200 37.081146 75.90 1 5.075299 0.7101080 3.613109 0.2965117
153.6700 40.511435 73.90 0 5.034807 0.5426302 3.701584 0.4501261
167.0050 50.603857 49.00 1 5.118024 0.8868243 3.924028 0.8363398
151.1300 43.970075 26.00 1 5.018140 0.4736930 3.783509 0.5923669
147.9550 33.792604 17.00 0 4.996908 0.3858736 3.520242 0.1352736
125.3998 21.375523 13.00 0 4.831507 -0.2982484 3.062247 -0.6599132
111.1250 16.669506 8.00 0 4.710656 -0.7981062 2.813581 -1.0916542
153.0350 49.890000 88.00 1 5.030667 0.5255033 3.909821 0.8116727
139.0650 33.594158 68.00 0 4.934941 0.1295706 3.514352 0.1250475
152.4000 43.856676 33.00 1 5.026509 0.5083052 3.780927 0.5878834
154.9400 48.137451 26.00 0 5.043038 0.5766727 3.874061 0.7495849
147.9550 42.751046 56.00 0 4.996908 0.3858736 3.755394 0.5435516
143.5100 34.841535 16.00 1 4.966405 0.2597071 3.550810 0.1883472
117.9830 24.097075 13.00 0 4.770541 -0.5504142 3.182091 -0.4518361
144.1450 33.906002 34.00 0 4.970820 0.2779682 3.523592 0.1410901
92.7100 12.076887 5.00 0 4.529476 -1.5474890 2.491293 -1.6512205
147.9550 41.276872 17.00 0 4.996908 0.3858736 3.720302 0.4826249
155.5750 39.717650 74.00 1 5.047128 0.5935894 3.681796 0.4157684
150.4950 35.947166 69.00 0 5.013930 0.4562776 3.582050 0.2425871
155.5750 50.915702 50.00 1 5.047128 0.5935894 3.930171 0.8470064
154.3050 45.756093 44.00 0 5.038931 0.5596864 3.823325 0.6614962
130.6068 25.259404 15.00 0 4.872191 -0.1299727 3.229198 -0.3700456
101.6000 15.337079 5.00 0 4.621043 -1.1687545 2.730273 -1.2362957
157.4800 49.214732 18.00 0 5.059298 0.6439284 3.896193 0.7880121
168.9100 58.825212 41.00 1 5.129366 0.9337375 4.074571 1.0977170
150.4950 43.459784 27.00 0 5.013930 0.4562776 3.771836 0.5720994
111.7600 17.831836 8.90 1 4.716354 -0.7745384 2.880985 -0.9746247
160.0200 51.964633 38.00 1 5.075299 0.7101080 3.950563 0.8824117
167.6400 50.688906 57.00 1 5.121819 0.9025213 3.925707 0.8392554
144.1450 34.246196 64.50 0 4.970820 0.2779682 3.533575 0.1584237
145.4150 39.377456 42.00 0 4.979592 0.3142503 3.673194 0.4008330
160.0200 59.562300 24.00 1 5.075299 0.7101080 4.087023 1.1193370
147.3200 40.312989 16.00 1 4.992607 0.3680837 3.696674 0.4416002
164.4650 52.163080 71.00 1 5.102698 0.8234340 3.954375 0.8890295
153.0350 39.972795 49.50 0 5.030667 0.5255033 3.688199 0.4268862
149.2250 43.941725 33.00 1 5.005455 0.4212254 3.782864 0.5912471
160.0200 54.601137 28.00 0 5.075299 0.7101080 4.000055 0.9683402
149.2250 45.075705 47.00 0 5.005455 0.4212254 3.808343 0.6354847
85.0900 11.453198 3.00 1 4.443709 -1.9022325 2.438269 -1.7432833
84.4550 11.765042 1.00 1 4.436219 -1.9332149 2.465133 -1.6966418
59.6138 5.896696 1.00 0 4.087887 -3.3739632 1.774392 -2.8959280
92.7100 12.105237 3.00 1 4.529476 -1.5474890 2.493638 -1.6471496
111.1250 18.313777 6.00 0 4.710656 -0.7981062 2.907654 -0.9283224
90.8050 11.368149 5.00 0 4.508714 -1.6333635 2.430816 -1.7562243
153.6700 41.333571 27.00 0 5.034807 0.5426302 3.721675 0.4850082
99.6950 16.244263 5.00 0 4.602116 -1.2470433 2.787740 -1.1365206
62.4840 6.803880 1.00 0 4.134911 -3.1794677 1.917493 -2.6474716
81.9150 11.878440 2.00 1 4.405682 -2.0595190 2.474725 -1.6799872
96.5200 14.968536 2.00 0 4.569750 -1.3809106 2.705950 -1.2785261
80.0100 9.865626 1.00 1 4.382152 -2.1568444 2.289057 -2.0023508
150.4950 41.900561 55.00 0 5.013930 0.4562776 3.735299 0.5086630
151.7650 42.524000 83.40 1 5.022333 0.4910353 3.750069 0.5343061
140.6398 28.859791 12.00 1 4.946202 0.1761459 3.362449 -0.1386912
88.2650 12.785625 2.00 0 4.480344 -1.7507086 2.548322 -1.5522066
158.1150 43.147939 63.00 1 5.063323 0.6605729 3.764635 0.5595962
149.2250 40.823280 52.00 0 5.005455 0.4212254 3.709252 0.4634399
151.7650 42.864444 49.00 1 5.022333 0.4910353 3.758043 0.5481509
154.9400 46.209685 31.00 0 5.043038 0.5766727 3.833189 0.6786232
123.8250 20.581737 9.00 0 4.818869 -0.3505199 3.024404 -0.7256163
104.1400 15.875720 6.00 0 4.645736 -1.0666224 2.764791 -1.1763653
161.2900 47.853956 35.00 1 5.083204 0.7428050 3.868154 0.7393295
148.5900 42.524250 35.00 0 5.001191 0.4035872 3.750075 0.5343163
97.1550 17.066399 7.00 0 4.576308 -1.3537883 2.837112 -1.0507998
93.3450 13.182517 5.00 1 4.536302 -1.5192559 2.578892 -1.4991299
160.6550 48.505994 24.00 1 5.079259 0.7264888 3.881687 0.7628269
157.4800 45.869491 41.00 1 5.059298 0.6439284 3.825800 0.6657938
167.0050 52.900167 32.00 1 5.118024 0.8868243 3.968406 0.9133915
157.4800 47.570461 43.00 1 5.059298 0.6439284 3.862212 0.7290131
91.4400 12.927372 6.00 0 4.515683 -1.6045401 2.559347 -1.5330639
60.4520 5.669900 1.00 1 4.101850 -3.3162120 1.735172 -2.9640243
137.1600 28.916490 15.00 1 4.921148 0.0725195 3.364412 -0.1352835
152.4000 43.544832 63.00 0 5.026509 0.5083052 3.773791 0.5754938
152.4000 43.431434 21.00 0 5.026509 0.5083052 3.771183 0.5709664
81.2800 11.509897 1.00 1 4.397900 -2.0917070 2.443207 -1.7347093
109.2200 11.708343 2.00 0 4.693364 -0.8696262 2.460302 -1.7050294
71.1200 7.540967 1.00 1 4.264369 -2.6440113 2.020350 -2.4688872
89.2048 12.700576 3.00 0 4.490935 -1.7069020 2.541647 -1.5637945
67.3100 7.200773 1.00 0 4.209309 -2.8717461 1.974188 -2.5490353
85.0900 12.360382 1.00 1 4.443709 -1.9022325 2.514496 -1.6109349
69.8500 7.796112 1.00 0 4.246350 -2.7185383 2.053625 -2.4111145
161.9250 53.212012 55.00 0 5.087133 0.7590570 3.974284 0.9235965
152.4000 44.678812 38.00 0 5.026509 0.5083052 3.799499 0.6201294
88.9000 12.558829 3.00 1 4.487512 -1.7210588 2.530424 -1.5832810
90.1700 12.700576 3.00 1 4.501697 -1.6623892 2.541647 -1.5637945
71.7550 7.370870 1.00 0 4.273257 -2.6072454 1.997536 -2.5084988
83.8200 9.213587 1.00 0 4.428672 -1.9644312 2.220679 -2.1210697
159.3850 47.201918 28.00 1 5.071323 0.6936621 3.854434 0.7155096
142.2400 28.632995 16.00 0 4.957516 0.2229411 3.354560 -0.1523894
142.2400 31.666391 36.00 0 4.957516 0.2229411 3.455256 0.0224427
168.9100 56.443855 38.00 1 5.129366 0.9337375 4.033246 1.0259687
123.1900 20.014747 12.00 1 4.813728 -0.3717854 2.996469 -0.7741176
74.9300 8.504850 1.00 1 4.316554 -2.4281638 2.140637 -2.2600425
74.2950 8.306404 1.00 0 4.308044 -2.4633652 2.117027 -2.3010347
90.8050 11.623295 3.00 0 4.508714 -1.6333635 2.453011 -1.7176873
160.0200 55.791816 48.00 1 5.075299 0.7101080 4.021627 1.0057950
67.9450 7.966209 1.00 0 4.218699 -2.8329089 2.075209 -2.3736404
135.8900 27.215520 15.00 0 4.911846 0.0340436 3.303787 -0.2405419
158.1150 47.485413 45.00 1 5.063323 0.6605729 3.860423 0.7259063
85.0900 10.801160 3.00 1 4.443709 -1.9022325 2.379653 -1.8450535
93.3450 14.004653 3.00 0 4.536302 -1.5192559 2.639390 -1.3940911
152.4000 45.160753 38.00 0 5.026509 0.5083052 3.810228 0.6387576
155.5750 45.529297 21.00 0 5.047128 0.5935894 3.818356 0.6528689
154.3050 48.874538 50.00 0 5.038931 0.5596864 3.889257 0.7759688
156.8450 46.578229 41.00 1 5.055258 0.6272167 3.841133 0.6924155
120.0150 20.128145 13.00 0 4.787617 -0.4797847 3.002119 -0.7643083
114.3000 18.143680 8.00 1 4.738827 -0.6815876 2.898322 -0.9445237
83.8200 10.914558 3.00 1 4.428672 -1.9644312 2.390097 -1.8269203
156.2100 43.885026 30.00 0 5.051201 0.6104372 3.781573 0.5890054
137.1600 27.158821 12.00 1 4.921148 0.0725195 3.301702 -0.2441629
114.3000 19.050864 7.00 1 4.738827 -0.6815876 2.947112 -0.8598127
93.9800 13.834556 4.00 0 4.543082 -1.4912142 2.627169 -1.4153081
168.2750 56.046962 21.00 1 5.125599 0.9181588 4.026190 1.0137170
147.9550 40.086193 38.00 0 4.996908 0.3858736 3.691032 0.4318048
139.7000 26.563482 15.00 1 4.939497 0.1484141 3.279537 -0.2826456
157.4800 50.802304 19.00 0 5.059298 0.6439284 3.927942 0.8431352
76.2000 9.213587 1.00 1 4.333361 -2.3586473 2.220679 -2.1210697
66.0400 7.569317 1.00 1 4.190261 -2.9505321 2.024103 -2.4623723
160.7000 46.300000 31.00 1 5.079539 0.7276472 3.835142 0.6820133
114.3000 19.419407 8.00 0 4.738827 -0.6815876 2.966273 -0.8265456
146.0500 37.903281 16.00 1 4.983949 0.3322727 3.635038 0.3345857
161.2900 49.356479 21.00 1 5.083204 0.7428050 3.899069 0.7930056
69.8500 7.314171 0.00 0 4.246350 -2.7185383 1.989814 -2.5219061
133.9850 28.151053 13.00 1 4.897728 -0.0243499 3.337585 -0.1818618
67.9450 7.824462 0.00 1 4.218699 -2.8329089 2.057255 -2.4048123
150.4950 44.111822 50.00 0 5.013930 0.4562776 3.786728 0.5979550
163.1950 51.029100 39.00 1 5.094946 0.7913707 3.932396 0.8508690
148.5900 40.766581 44.00 1 5.001191 0.4035872 3.707863 0.4610268
148.5900 37.563088 36.00 0 5.001191 0.4035872 3.626022 0.3189321
161.9250 51.596090 36.00 1 5.087133 0.7590570 3.943446 0.8700541
153.6700 44.820560 18.00 0 5.034807 0.5426302 3.802667 0.6256291
68.5800 8.022908 0.00 0 4.228001 -2.7944329 2.082301 -2.3613266
151.1300 43.403084 58.00 0 5.018140 0.4736930 3.770531 0.5698327
163.8300 46.719976 58.00 1 5.098829 0.8074334 3.844172 0.6976912
153.0350 39.547553 33.00 0 5.030667 0.5255033 3.677504 0.4083167
151.7650 34.784836 21.50 0 5.022333 0.4910353 3.549182 0.1855194
132.0800 22.792998 11.00 1 4.883408 -0.0835797 3.126453 -0.5484351
156.2100 39.292407 26.00 1 5.051201 0.6104372 3.671031 0.3970789
140.3350 37.449689 22.00 0 4.944032 0.1671721 3.622998 0.3136827
158.7500 48.676091 28.00 1 5.067331 0.6771506 3.885188 0.7689048
142.8750 35.606972 42.00 0 4.961970 0.2413650 3.572541 0.2260777
84.4550 9.383684 2.00 1 4.436219 -1.9332149 2.238973 -2.0893085
151.9428 43.714929 21.00 1 5.023504 0.4958781 3.777690 0.5822627
161.2900 48.194150 19.00 1 5.083204 0.7428050 3.875238 0.7516287
127.9906 29.852024 13.00 1 4.851957 -0.2136652 3.396253 -0.0800008
160.9852 50.972401 48.00 1 5.081312 0.7349812 3.931284 0.8489388
144.7800 43.998424 46.00 0 4.975215 0.2961490 3.784154 0.5934860
132.0800 28.292801 11.00 1 4.883408 -0.0835797 3.342607 -0.1731414
117.9830 20.354941 8.00 1 4.770541 -0.5504142 3.013324 -0.7448546
160.0200 48.194150 25.00 1 5.075299 0.7101080 3.875238 0.7516287
154.9400 39.179009 16.00 1 5.043038 0.5766727 3.668141 0.3920609
160.9852 46.691626 51.00 1 5.081312 0.7349812 3.843565 0.6966373
165.9890 56.415505 25.00 1 5.111922 0.8615846 4.032744 1.0250964
157.9880 48.591043 28.00 1 5.062519 0.6572493 3.883439 0.7658685
154.9400 48.222499 26.00 0 5.043038 0.5766727 3.875826 0.7526497
97.9932 13.295915 5.00 1 4.584898 -1.3182570 2.587457 -1.4842584
64.1350 6.662133 1.00 0 4.160990 -3.0715984 1.896440 -2.6840252
160.6550 47.485413 54.00 1 5.079259 0.7264888 3.860423 0.7259063
147.3200 35.550273 66.00 0 4.992607 0.3680837 3.570948 0.2233108
146.7000 36.600000 20.00 0 4.988390 0.3506399 3.600048 0.2738358
147.3200 48.959587 25.00 0 4.992607 0.3680837 3.890995 0.7789875
172.9994 51.255896 38.00 1 5.153288 1.0326826 3.936831 0.8585685
158.1150 46.521529 51.00 1 5.063323 0.6605729 3.839915 0.6903007
147.3200 36.967748 48.00 0 4.992607 0.3680837 3.610046 0.2911940
124.9934 25.117657 13.00 1 4.828261 -0.3116747 3.223571 -0.3798162
106.0450 16.272613 6.00 1 4.663863 -0.9916451 2.789483 -1.1334932
165.9890 48.647742 27.00 1 5.111922 0.8615846 3.884605 0.7678933
149.8600 38.045029 22.00 0 5.009702 0.4387886 3.638770 0.3410666
76.2000 8.504850 1.00 0 4.333361 -2.3586473 2.140637 -2.2600425
161.9250 47.286966 60.00 1 5.087133 0.7590570 3.856235 0.7186352
140.0048 28.349500 15.00 0 4.941677 0.1574286 3.344609 -0.1696655
66.6750 8.136306 0.00 0 4.199830 -2.9109515 2.096336 -2.3369580
62.8650 7.200773 0.00 1 4.140990 -3.1543240 1.974188 -2.5490353
163.8300 55.394923 43.00 1 5.098829 0.8074334 4.014488 0.9933996
147.9550 32.488527 12.00 1 4.996908 0.3858736 3.480887 0.0669442
160.0200 54.204244 27.00 1 5.075299 0.7101080 3.992759 0.9556735
154.9400 48.477645 30.00 1 5.043038 0.5766727 3.881103 0.7618119
152.4000 43.062891 29.00 0 5.026509 0.5083052 3.762662 0.5561705
62.2300 7.257472 0.00 0 4.130837 -3.1963156 1.982032 -2.5354177
146.0500 34.189497 23.00 0 4.983949 0.3322727 3.531919 0.1555467
151.9936 49.951819 30.00 0 5.023838 0.4972608 3.911059 0.8138228
157.4800 41.305222 17.00 1 5.059298 0.6439284 3.720989 0.4838170
55.8800 4.847765 0.00 0 4.023206 -3.6414909 1.578518 -3.2360117
60.9600 6.236890 0.00 1 4.110218 -3.2815998 1.830482 -2.7985436
151.7650 44.338618 41.00 0 5.022333 0.4910353 3.791856 0.6068588
144.7800 33.452410 42.00 0 4.975215 0.2961490 3.510124 0.1177061
118.1100 16.896302 7.00 0 4.771616 -0.5459643 2.827095 -1.0681913
78.1050 8.221355 3.00 0 4.358054 -2.2565152 2.106735 -2.3189034
160.6550 47.286966 43.00 1 5.079259 0.7264888 3.856235 0.7186352
151.1300 46.124637 35.00 0 5.018140 0.4736930 3.831347 0.6754247
121.9200 20.184844 10.00 0 4.803365 -0.4146473 3.004932 -0.7594244
92.7100 12.757275 3.00 1 4.529476 -1.5474890 2.546102 -1.5560607
153.6700 47.400364 75.50 1 5.034807 0.5426302 3.858630 0.7227938
147.3200 40.851630 64.00 0 4.992607 0.3680837 3.709947 0.4646452
139.7000 50.348712 38.00 1 4.939497 0.1484141 3.918973 0.8275635
157.4800 45.132404 24.20 0 5.059298 0.6439284 3.809601 0.6376673
91.4400 11.623295 4.00 0 4.515683 -1.6045401 2.453011 -1.7176873
154.9400 42.240755 26.00 1 5.043038 0.5766727 3.743386 0.5227027
143.5100 41.645415 19.00 0 4.966405 0.2597071 3.729191 0.4980582
83.1850 9.156889 2.00 1 4.421067 -1.9958849 2.214506 -2.1317872
158.1150 45.217453 43.00 1 5.063323 0.6605729 3.811483 0.6409360
147.3200 51.255896 38.00 0 4.992607 0.3680837 3.936831 0.8585685
123.8250 21.205426 10.00 1 4.818869 -0.3505199 3.054257 -0.6737846
88.9000 11.594945 3.00 1 4.487512 -1.7210588 2.450569 -1.7219272
160.0200 49.271431 23.00 1 5.075299 0.7101080 3.897344 0.7900112
137.1600 27.952607 16.00 0 4.921148 0.0725195 3.330510 -0.1941445
165.1000 51.199197 49.00 1 5.106551 0.8393729 3.935724 0.8566468
154.9400 43.856676 41.00 0 5.043038 0.5766727 3.780927 0.5878834
111.1250 17.690088 6.00 1 4.710656 -0.7981062 2.873004 -0.9884813
153.6700 35.521923 23.00 0 5.034807 0.5426302 3.570150 0.2219257
145.4150 34.246196 14.00 0 4.979592 0.3142503 3.533575 0.1584237
141.6050 42.885420 43.00 0 4.953042 0.2044349 3.758532 0.5490004
144.7800 32.545226 15.00 0 4.975215 0.2961490 3.482631 0.0699716
163.8300 46.776675 21.00 1 5.098829 0.8074334 3.845385 0.6997970
161.2900 41.872211 24.00 1 5.083204 0.7428050 3.734622 0.5074879
154.9000 38.200000 20.00 1 5.042780 0.5756047 3.642835 0.3481245
161.3000 43.300000 20.00 1 5.083266 0.7430614 3.768153 0.5657042
170.1800 53.637254 34.00 1 5.136857 0.9647200 3.982244 0.9374164
149.8600 42.977842 29.00 0 5.009702 0.4387886 3.760685 0.5527381
123.8250 21.545620 11.00 1 4.818869 -0.3505199 3.070172 -0.6461517
85.0900 11.424848 3.00 0 4.443709 -1.9022325 2.435791 -1.7475863
160.6550 39.774349 65.00 1 5.079259 0.7264888 3.683222 0.4182452
154.9400 43.346385 46.00 0 5.043038 0.5766727 3.769223 0.5675632
106.0450 15.478827 8.00 0 4.663863 -0.9916451 2.739473 -1.2203229
126.3650 21.914164 15.00 1 4.839175 -0.2665345 3.087133 -0.6167041
166.3700 52.673371 43.00 1 5.114214 0.8710676 3.964110 0.9059318
148.2852 38.441922 39.00 0 4.999137 0.3950941 3.649149 0.3590855
124.4600 19.277660 12.00 0 4.823984 -0.3293631 2.958947 -0.8392653
89.5350 11.113004 3.00 1 4.494630 -1.6916199 2.408116 -1.7956360
101.6000 13.494362 4.00 0 4.621043 -1.1687545 2.602272 -1.4585360
151.7650 42.807745 43.00 0 5.022333 0.4910353 3.756719 0.5458528
148.5900 35.890467 70.00 0 5.001191 0.4035872 3.580472 0.2398464
153.6700 44.225220 26.00 0 5.034807 0.5426302 3.789295 0.6024126
53.9750 4.252425 0.00 0 3.988521 -3.7849551 1.447489 -3.4635073
146.6850 38.073378 48.00 0 4.988287 0.3502170 3.639515 0.3423599
56.5150 5.159609 0.00 0 4.034506 -3.5947543 1.640861 -3.1277696
100.9650 14.316498 5.00 1 4.614774 -1.1946865 2.661412 -1.3558542
121.9200 23.218241 8.00 1 4.803365 -0.4146473 3.144938 -0.5163411
81.5848 10.659412 3.00 0 4.401643 -2.0762255 2.366443 -1.8679895
154.9400 44.111822 44.00 1 5.043038 0.5766727 3.786728 0.5979550
156.2100 44.026773 33.00 0 5.051201 0.6104372 3.784798 0.5946043
132.7150 24.975910 15.00 1 4.888204 -0.0637420 3.217912 -0.3896421
125.0950 22.594552 12.00 0 4.829073 -0.3083140 3.117709 -0.5636177
101.6000 14.344847 5.00 0 4.621043 -1.1687545 2.663391 -1.3524195
160.6550 47.882306 41.00 1 5.079259 0.7264888 3.868746 0.7403577
146.0500 39.405805 37.40 0 4.983949 0.3322727 3.673913 0.4020825
132.7150 24.777463 13.00 0 4.888204 -0.0637420 3.209935 -0.4034924
87.6300 10.659412 6.00 0 4.473123 -1.7805726 2.366443 -1.8679895
156.2100 41.050076 53.00 1 5.051201 0.6104372 3.714793 0.4730589
152.4000 40.823280 49.00 0 5.026509 0.5083052 3.709252 0.4634399
162.5600 47.031821 27.00 0 5.091047 0.7752454 3.850824 0.7092416
114.9350 17.519991 7.00 1 4.744367 -0.6586726 2.863343 -1.0052567
67.9450 7.229122 1.00 0 4.218699 -2.8329089 1.978118 -2.5422132
142.8750 34.246196 31.00 0 4.961970 0.2413650 3.533575 0.1584237
76.8350 8.022908 1.00 1 4.341660 -2.3243223 2.082301 -2.3613266
145.4150 31.127751 17.00 1 4.979592 0.3142503 3.438100 -0.0073445
162.5600 52.163080 31.00 1 5.091047 0.7752454 3.954375 0.8890295
156.2100 54.062497 21.00 0 5.051201 0.6104372 3.990141 0.9511272
71.1200 8.051258 0.00 1 4.264369 -2.6440113 2.085828 -2.3552023
158.7500 52.531624 68.00 1 5.067331 0.6771506 3.961415 0.9012532

Notice that each row sums to 1, all the birds. This problem has two parts. It is not computationally complicated. But it is conceptually tricky. First, compute the entropy of each island’s bird distribution. Interpret these entropy values. Second, use each island’s bird distribution to predict the other two. This means to compute the KL divergence of each island from the others, treating each island as if it were a statistical model of the other islands. You should end up with 6 different KL divergence values. Which island predicts the others best? Why?

p1 <- c(0.2, 0.2, 0.2, 0.2, 0.2)
-sum(p1 * log(p1))
## [1] 1.609438
p2 <- c(0.8, 0.1, 0.05, 0.025, 0.025)
-sum(p2 * log(p2))
## [1] 0.7430039
p3 <- c(0.05, 0.15, 0.7, 0.05, 0.05)
-sum(p3 * log(p3))
## [1] 0.9836003
D_kl <- function(p, q) sum(p * (log(p) - log(q)))
D_kl(p1, p2)
## [1] 0.9704061
D_kl(p1, p3)
## [1] 0.6387604
D_kl(p2, p1)
## [1] 0.866434
D_kl(p2, p3)
## [1] 2.010914
D_kl(p3, p1)
## [1] 0.6258376
D_kl(p3, p2)
## [1] 1.838845
#Island 1 the most tough to predict due to they has five bird species evenly #distributed. And Island 2 is much easier to predict because the vast majority 
#is species A, leading to the lowest number of entropy. and also, Island 1has 
#the highest entropy based on the KL distance is shorter. 

7-4. Recall the marriage, age, and happiness collider bias example from Chapter 6. Run models m6.9 and m6.10 again (page 178). Compare these two models using WAIC (or PSIS, they will produce identical results). Which model is expected to make better predictions? Which model provides the correct causal inference about the influence of age on happiness? Can you explain why the answers to these two questions disagree?

d <- sim_happiness(seed = 1977, N_years = 1000)
d2 <- d[d$age>17,] # only adults
d2$A <- (d2$age - 18) / (65 - 18)
d2$mid <- d2$married + 1

# m6.9
m6.9 <- quap(
    alist(
        happiness ~ dnorm(mu, sigma),
        mu <- a[mid] + bA*A,
        a[mid] ~ dnorm(0, 1),
        bA ~ dnorm(0, 2),
        sigma ~ dexp(1)
    ) , data=d2)
precis(m6.9, depth = 2)
##             mean         sd       5.5%      94.5%
## a[1]  -0.2350877 0.06348986 -0.3365568 -0.1336186
## a[2]   1.2585517 0.08495989  1.1227694  1.3943340
## bA    -0.7490274 0.11320112 -0.9299447 -0.5681102
## sigma  0.9897080 0.02255800  0.9536559  1.0257600
m6.10 <- quap(
    alist(
        happiness ~ dnorm(mu, sigma),
        mu <- a + bA*A,
        a ~ dnorm(0, 1),
        bA ~ dnorm(0, 2),
        sigma ~ dexp(1)
    ) , data=d2 )
precis(m6.10)
##                mean         sd       5.5%     94.5%
## a      1.649248e-07 0.07675015 -0.1226614 0.1226617
## bA    -2.728620e-07 0.13225976 -0.2113769 0.2113764
## sigma  1.213188e+00 0.02766080  1.1689803 1.2573949
compare(m6.9, m6.10)
##           WAIC       SE    dWAIC      dSE    pWAIC       weight
## m6.9  2713.971 37.54465   0.0000       NA 3.738532 1.000000e+00
## m6.10 3101.906 27.74379 387.9347 35.40032 2.340445 5.768312e-85
#m6.9 performs better for prediction. and  m6.10 provides reflects the 
#true causal relationship between age and happiness.

7-5. Revisit the urban fox data, data(foxes), from the previous chapter’s practice problems. Use WAIC or PSIS based model comparison on five different models, each using weight as the outcome, and containing these sets of predictor variables:

Can you explain the relative differences in WAIC scores, using the fox DAG from the previous chapter? Be sure to pay attention to the standard error of the score differences (dSE).

data(foxes)
fox_dat <- foxes[,-1] %>%
           as_tibble() %>%
           mutate(across(everything(), standardize))

set.seed(1234)
N<-100
a <- rnorm(N, 0, 0.3)
b <- rnorm(N, 0, 0.5)
plot(NULL, xlim=range(fox_dat$area),ylim=c(-4,4))
xbar<-mean(fox_dat$area)
for(i in 1:N) curve(a[i] + b[i]*(x- xbar),
                   from=min(fox_dat$area), to = max(fox_dat$area), add = TRUE,
                   col = col.alpha("blue",0.2)
                   )

m1 = quap(
  alist(
      weight ~ dnorm(mu, sigma),
      mu <- a + b_avgfood*avgfood + b_groupsize*groupsize + b_area*area,
      a ~ dnorm(0,3),
      b_avgfood ~ dnorm(0,5),
      b_groupsize ~ dnorm(0,5),
      b_area ~ dnorm(0,5), 
     sigma ~ dexp(1)
  ), data = fox_dat
)

m2 = quap(
  alist(
      weight ~ dnorm(mu, sigma),
      mu <- a + b_avgfood*avgfood + b_groupsize*groupsize,
      a ~ dnorm(0,3),
      b_avgfood ~ dnorm(0,5),
      b_groupsize ~ dnorm(0,5),
     sigma ~ dexp(1)
  ), data = fox_dat
)

m3 = quap(
  alist(
      weight ~ dnorm(mu, sigma),
      mu <- a + b_area*area + b_groupsize*groupsize,
      a ~ dnorm(0,3),
      b_area ~ dnorm(0,5),
      b_groupsize ~ dnorm(0,5),
     sigma ~ dexp(1)
  ), data = fox_dat
)

m4 = quap(
  alist(
      weight ~ dnorm(mu, sigma),
      mu <- a + b_avgfood*avgfood,
      a ~ dnorm(0,3),
      b_avgfood ~ dnorm(0,5),
     sigma ~ dexp(1)
  ), data = fox_dat
)

m5 = quap(
  alist(
      weight ~ dnorm(mu, sigma),
      mu <- a + b_area*area,
      a ~ dnorm(0,3),
      b_area ~ dnorm(0,5),
     sigma ~ dexp(1)
  ), data = fox_dat
)

compare(m1, m2, m3, m4, m5)
##        WAIC       SE      dWAIC      dSE    pWAIC      weight
## m1 323.7790 16.97973  0.0000000       NA 5.394304 0.395584053
## m2 324.0854 16.82870  0.3063355 3.890751 4.194372 0.339405493
## m3 324.6152 16.13735  0.8361358 4.277576 4.220335 0.260419919
## m4 333.9423 13.86435 10.1632843 8.712388 2.663152 0.002456460
## m5 334.2237 13.90559 10.4446596 8.760104 2.886085 0.002134075
plot(compare(m1, m2, m3, m4, m5))

#M1, m2, and m3 have dWAIC that are close to each other, and then, 
#M4 and m5 have dWAIC that are close to each other.