|
35 | 35 | #' * `"prediction"` also gives an output on the response scale, but this time |
36 | 36 | #' associated with a prediction interval (PI), which is larger than a confidence |
37 | 37 | #' interval (though it mostly make sense for linear models). |
38 | | -#' * `"classification"` only differs from `"prediction"` for binomial models |
39 | | -#' where it additionally transforms the predictions into the original response's |
40 | | -#' type (for instance, to a factor). |
| 38 | +#' * `"classification"` is releveant only for binomial, ordinal or mixture models. |
| 39 | +#' - For binomial models, `predict = "classification"` will additionally |
| 40 | +#' transform the predictions into the original response's type (for |
| 41 | +#' instance, to a factor). |
| 42 | +#' - For ordinal models (e.g., classes `clm` or `multinom`), gives the |
| 43 | +#' predicted response class membership, defined as highest probability |
| 44 | +#' prediction. |
| 45 | +#' - For finite mixture models (currently only family [`brms::mixture()`] from |
| 46 | +#' package *brms*), returns a vector of predicted class membership (similar |
| 47 | +#' as for ordinal models). |
41 | 48 | #' * Other strings are passed directly to the `type` argument of the `predict()` |
42 | 49 | #' method supplied by the modelling package. |
43 | 50 | #' * Specifically for models of class `brmsfit` (package *brms*), the `predict` |
|
49 | 56 | #' by the modelling package. Note that this might result in conflicts with |
50 | 57 | #' multiple matching `type` arguments - thus, the recommendation is to use the |
51 | 58 | #' `predict` argument for those values. |
52 | | -#' * Notes: You can see the 4 options for predictions as on a gradient from |
| 59 | +#' * Notes: You can see the four options for predictions as on a gradient from |
53 | 60 | #' "close to the model" to "close to the response data": "link", "expectation", |
54 | 61 | #' "prediction", "classification". The `predict` argument modulates two things: |
55 | 62 | #' the scale of the output and the type of certainty interval. Read more about |
|
138 | 145 | #' and no transformation is applied. For instance, for a logistic regression |
139 | 146 | #' model, the response scale corresponds to the predicted probabilities, whereas |
140 | 147 | #' the link-scale makes predictions of log-odds (probabilities on the logit |
141 | | -#' scale). Note that when users select `predict="classification"` in binomial |
| 148 | +#' scale). Note that when users select `predict = "classification"` in binomial |
142 | 149 | #' models, the `get_predicted()` function will first calculate predictions as if |
143 | | -#' the user had selected `predict="expectation"`. Then, it will round the |
144 | | -#' responses in order to return the most likely outcome. |
| 150 | +#' the user had selected `predict = "expectation"`. Then, it will round the |
| 151 | +#' responses in order to return the most likely outcome. For ordinal or mixture |
| 152 | +#' models, it returns the predicted class membership, based on the highest |
| 153 | +#' probability of classification. |
145 | 154 | #' |
146 | 155 | #' @section Heteroscedasticity consistent standard errors: The arguments `vcov` |
147 | 156 | #' and `vcov_args` can be used to calculate robust standard errors for |
|
0 commit comments