|
2 | 2 | #' @noRd |
3 | 3 | .brms_aux_elements <- function(model = NULL) { |
4 | 4 | out <- c( |
5 | | - "sigma", "mu", "nu", "shape", "beta", "phi", "hu", "ndt", "zoi", "coi", |
6 | | - "kappa", "bias", "bs", "zi", "alpha", "xi", "delta", "k" |
| 5 | + "sigma", |
| 6 | + "mu", |
| 7 | + "nu", |
| 8 | + "shape", |
| 9 | + "beta", |
| 10 | + "phi", |
| 11 | + "hu", |
| 12 | + "ndt", |
| 13 | + "zoi", |
| 14 | + "coi", |
| 15 | + "kappa", |
| 16 | + "bias", |
| 17 | + "bs", |
| 18 | + "zi", |
| 19 | + "alpha", |
| 20 | + "xi", |
| 21 | + "delta", |
| 22 | + "k" |
7 | 23 | ) |
8 | 24 | unique(c(out, insight::find_auxiliary(model, verbose = FALSE))) |
9 | 25 | } |
|
13 | 29 | #' @noRd |
14 | 30 | .valid_coefficient_names <- function(model = NULL) { |
15 | 31 | out <- c( |
16 | | - "Mean", "Probability", "Difference", "Ratio", "Rate", "ZI-Probability", |
17 | | - "Proportion", "Median", "MAP", "Coefficient", "Odds_ratio" |
| 32 | + "Mean", |
| 33 | + "Probability", |
| 34 | + "Difference", |
| 35 | + "Ratio", |
| 36 | + "Rate", |
| 37 | + "ZI-Probability", |
| 38 | + "Proportion", |
| 39 | + "Median", |
| 40 | + "MAP", |
| 41 | + "Coefficient", |
| 42 | + "Odds_ratio" |
18 | 43 | ) |
19 | 44 | dpars <- insight::find_auxiliary(model, verbose = FALSE) |
20 | 45 | if (!is.null(dpars)) { |
|
46 | 71 |
|
47 | 72 | #' @keywords internal |
48 | 73 | #' @noRd |
49 | | -.check_standard_errors <- function(out, |
50 | | - by = NULL, |
51 | | - contrast = NULL, |
52 | | - model = NULL, |
53 | | - model_name = "model", |
54 | | - verbose = TRUE, |
55 | | - ...) { |
| 74 | +.check_standard_errors <- function( |
| 75 | + out, |
| 76 | + by = NULL, |
| 77 | + contrast = NULL, |
| 78 | + model = NULL, |
| 79 | + model_name = "model", |
| 80 | + verbose = TRUE, |
| 81 | + ... |
| 82 | +) { |
56 | 83 | if (!verbose || is.null(out$SE)) { |
57 | 84 | return(NULL) |
58 | 85 | } |
|
85 | 112 | code_snippet <- paste0(code_snippet, "\n)") |
86 | 113 | # setup message |
87 | 114 | msg <- insight::format_message( |
88 | | - "Could not calculate standard errors for contrasts. This can happen when random effects are involved. You may try following:" |
| 115 | + "Could not calculate standard errors for contrasts. This can happen when random effects are involved." |
89 | 116 | ) |
90 | 117 | # add example code, if valid |
91 | 118 | if (!is.null(by_vars)) { |
92 | | - msg <- c(msg, insight::color_text(code_snippet, "green"), "\n") |
| 119 | + msg <- c( |
| 120 | + paste0(msg, "You may try following:"), |
| 121 | + insight::color_text(code_snippet, "green"), |
| 122 | + "\n" |
| 123 | + ) |
93 | 124 | } |
94 | 125 | message(msg) |
95 | 126 |
|
|
145 | 176 | } |
146 | 177 |
|
147 | 178 | # no need to check if check is disabled |
148 | | - if (is.null(integer_as_continuous) || is.na(integer_as_continuous) || isTRUE(integer_as_continuous)) { |
| 179 | + if ( |
| 180 | + is.null(integer_as_continuous) || |
| 181 | + is.na(integer_as_continuous) || |
| 182 | + isTRUE(integer_as_continuous) |
| 183 | + ) { |
149 | 184 | return(FALSE) |
150 | 185 | } |
151 | 186 |
|
|
0 commit comments