Skip to content

Commit

Permalink
styler
Browse files Browse the repository at this point in the history
  • Loading branch information
zdz2101 committed Feb 26, 2024
1 parent 6ad5b37 commit a62e07b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions R/ard_vif.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ ard_vif <- function(x) {
# if VIF is returned
if (is.null(vif$result)) {
vif$result <- dplyr::tibble(variable = names(temp$coefficients)[-1], VIF = list(NULL))
}
else if (!is.matrix(vif$result)) {
vif$result <- dplyr::tibble(variable = names(vif$result) , VIF = vif$result)
} else if (!is.matrix(vif$result)) {
vif$result <- dplyr::tibble(variable = names(vif$result), VIF = vif$result)
} # if Generalized VIF is returned
else if (is.matrix(vif$result)){
else if (is.matrix(vif$result)) {
vif$result <-
vif$result |>
as.data.frame() %>%
as.data.frame() %>%
dplyr::mutate(., variable = rownames(.), .before = 1L) |>
dplyr::rename(
aGVIF = "GVIF^(1/(2*Df))",
Expand Down

0 comments on commit a62e07b

Please sign in to comment.