Skip to content

Commit

Permalink
Merge pull request #485 from gungorMetehan/patch-1
Browse files Browse the repository at this point in the history
Update 92-appendixB.Rmd
  • Loading branch information
ismayc authored Feb 12, 2024
2 parents d495759 + ac1c4bc commit e6fba0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 92-appendixB.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ n_nograd <- off_summ$sample_size[1]
n_grad <- off_summ$sample_size[2]
```

Observe that of the college graduates, a proportion of `r counts[2, 2]`/(`r counts[2, 2]` + `r counts[2, 3]`) = `r phat_grad` have no opinion on drilling. On the other hand, of the non-college graduates, a proportion of `r counts[1, 2]`/(`r counts[1, 2]` + `r counts[1, 3]`) = `r phat_nograd` have no opinion on drilling, whereas . The difference in these proportions is `r phat_grad` - `r phat_nograd` = `r obs_diff`.
Observe that of the college graduates, a proportion of `r counts[2, 2]`/(`r counts[2, 2]` + `r counts[2, 3]`) = `r phat_grad` have no opinion on drilling. On the other hand, of the non-college graduates, a proportion of `r counts[1, 2]`/(`r counts[1, 2]` + `r counts[1, 3]`) = `r phat_nograd` have no opinion on drilling, whereas the difference in these proportions is `r phat_grad` - `r phat_nograd` = `r obs_diff`.

Let's visualize these in a barchart. However, we first reverse the order of the levels in the categorical variable `response` using the `fct_rev()` function from the `forcats` package. We do this because the default ordering of levels in a factor is alphanumeric. However, we are interested in proportions that have `no opinion` and not `opinion`. Thus we need to reverse the default alphanumeric order.

Expand Down

0 comments on commit e6fba0c

Please sign in to comment.