Closed Shmuma closed 3 years ago
New version produces this output, which is the same as in the book
┌────────────┬─────────────────────────────────────────────────────────┐
│ param │ mean std 5.5% 50% 94.5% histogram │
├────────────┼─────────────────────────────────────────────────────────┤
│ year │ 1408.0 350.885 867.77 1408.0 1948.23 ████████████▂ │
│ doy │ 104.54 6.407 94.43 105.0 115.0 ▁▂▆██▅▂▁ │
│ temp │ 6.1419 0.6636 5.15 6.1 7.2947 ▁▄▆█▄▂▁▁ │
│ temp_upper │ 7.1852 0.9929 5.8977 7.04 8.9023 ▂██▃▁▁▁▁ │
│ temp_lower │ 5.0989 0.8503 3.7876 5.145 6.37 ▁▁▁▂▇█▂▁ │
└────────────┴─────────────────────────────────────────────────────────┘
Hi!
I found a problem with
precis
function, which crashes if dataframe contains missing values. In section 4.5 of the book, "cherry blossoms" dataset is being analized, where 50% of cases contain missing values.How to reproduce: You can take the data here: https://github.com/Shmuma/rethinking-2ed-julia/blob/main/data/cherry_blossoms.csv
The result is
If I drop rows with missing values, only 787 of 1215 cases will be left. Precis will work, but produce result different from the book
The output is