Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section 5.1.2 #51

Open
ASKurz opened this issue Jan 2, 2024 · 0 comments
Open

Section 5.1.2 #51

ASKurz opened this issue Jan 2, 2024 · 0 comments

Comments

@ASKurz
Copy link
Owner

ASKurz commented Jan 2, 2024

Add in section 5.1.2, which has some important computations. Whether in table format or otherwise, do the computation in Table 5.3. Also, work through the rare-disease problem on pages 103--104. Here's that computation in code.

data.frame(p_pos_g_dis = 0.99,
           p_pos_g_nodis = 0.05) %>% 
  mutate(p_neg_g_dis = 1.0 - p_pos_g_dis,
         p_neg_g_nodis = 1.0 - p_neg_g_dis,
         p_dis = 0.001) %>% 
  mutate(p_nodis = 1.0 - p_dis) %>% 
  mutate(p_dis_g_pos = (p_pos_g_dis * p_dis) / (p_pos_g_dis * p_dis + p_pos_g_nodis * p_nodis)) %>% 
  glimpse()
Rows: 1
Columns: 7
$ p_pos_g_dis   <dbl> 0.99
$ p_pos_g_nodis <dbl> 0.05
$ p_neg_g_dis   <dbl> 0.01
$ p_neg_g_nodis <dbl> 0.99
$ p_dis         <dbl> 0.001
$ p_nodis       <dbl> 0.999
$ p_dis_g_pos   <dbl> 0.01943463

Then when you do this, reference McElreath's vampire example from Chapter 3 in either of this texts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant