Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
nxskok committed Jan 25, 2024
1 parent ffb9168 commit 2e87cc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion choosing.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ athletes %>%
## Summary of data selection/arrangement "verbs" {.smaller}

| Verb | Purpose |
|:-----------------|:-----------------------------------------------------|
|:----------------|:------------------------------------------------------|
| `select` | Choose columns |
| `slice` | Choose rows by number |
| `slice_sample` | Choose random rows |
Expand Down
11 changes: 9 additions & 2 deletions logistic.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ rat2.1 <- glm(response ~ dose, family = "binomial", data = rat2)
summary(rat2.1)
```

## Predicted survival probs
## Predicted survival probs

```{r bLogistic-13 }
#| warning = FALSE
Expand Down Expand Up @@ -400,6 +400,8 @@ For probability $p$, odds is $p/(1-p)$:
- Recall prediction of probability of death from risk factors:

```{r bLogistic-20}
sepsis
summary(sepsis.2)
sepsis.2.tidy <- tidy(sepsis.2)
sepsis.2.tidy
```
Expand Down Expand Up @@ -540,6 +542,7 @@ miners
miners %>%
group_by(Exposure) %>%
mutate(proportion = Freq / sum(Freq)) -> prop
prop
ggplot(prop, aes(x = Exposure, y = proportion,
colour = Severity)) +
geom_point() + geom_smooth(se = F)
Expand Down Expand Up @@ -622,7 +625,11 @@ cbind(predictions(sev.1, newdata = new)) %>%

```{r}
plot_predictions(model = sev.1, condition = c("Exposure", "group"),
type = "probs") +
type = "probs")
```

```{+}
geom_point(data = prop, aes(x = Exposure, y = proportion,
colour = Severity)) -> ggg
```
Expand Down

0 comments on commit 2e87cc8

Please sign in to comment.