|
1 | | - |
2 | 1 | #' Reliability Growth Analysis. |
3 | 2 | #' |
4 | 3 | #' This function performs reliability growth analysis using the Crow-AMSAA model by |
|
58 | 57 | #' @srrstats {G5.9a} Unit tests check that adding trivial noise to data does not meaningfully change results. |
59 | 58 | #' @srrstats {G5.9b} Unit tests check that different random seeds do not meaningfully change results. |
60 | 59 | #' @srrstats {G5.10} All unit tests run as part of continuous integration. |
61 | | -#' @srrstats {RE1.2] Documentation includes expected format for inputting predictor variables |
62 | | -#' (`times`, `failures`). |
| 60 | +#' @srrstats {RE1.2} Documentation includes expected format for inputting predictor variables (`times`, `failures`). |
63 | 61 | #' @srrstats {RE1.3} Output retains all relevant aspects of input data. |
64 | 62 | #' @srrstats {RE1.3a} Output retains all relevant aspects of input data. |
65 | 63 | #' @srrstats {RE1.4} Documentation includes assumptions for the input data (i.e., positive, finite values). |
|
93 | 91 | #' @srrstats {RE7.2} Unit tests demonstrate that output objects retain aspects |
94 | 92 | #' of input data such as case names. |
95 | 93 | #' @srrstats {RE7.3} Unit tests demonstrate expected behavior when `rga` object |
96 | | -#'is submitted to the accessor methods `print` and `plot`. |
| 94 | +#' is submitted to the accessor methods `print` and `plot`. |
97 | 95 | #' |
98 | 96 | #' @param times Either a numeric vector of cumulative failure times or a data frame |
99 | 97 | #' containing both failure times and failure counts. If a data frame is provided, it must |
@@ -228,7 +226,7 @@ rga <- function(times, failures, model_type = "Crow-AMSAA", breaks = NULL, conf_ |
228 | 226 | # Check for perfect collinearity |
229 | 227 | cor_val <- suppressWarnings(cor(log_times, log_cum_failures)) |
230 | 228 | if (is.na(cor_val) || abs(cor_val - 1) < .Machine$double.eps^0.5 || |
231 | | - abs(cor_val + 1) < .Machine$double.eps^0.5) { |
| 229 | + abs(cor_val + 1) < .Machine$double.eps^0.5) { |
232 | 230 | stop("Perfect collinearity detected between predictor ('log_times') and response ('log_cum_failures'). Regression cannot be performed.") |
233 | 231 | } |
234 | 232 |
|
|
0 commit comments