Skip to content

Commit

Permalink
adopt feedback and add quick qeuestion
Browse files Browse the repository at this point in the history
  • Loading branch information
zdz2101 committed Feb 28, 2024
1 parent 75f13b5 commit 2c26294
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
4 changes: 3 additions & 1 deletion R/ard_vif.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#' @param x regression model object
#' See car::vif() for details
#'
#' Do I need to add "type" or "..." as pass-through?
#'
#' @return data frame
#' @name ard_vif
#' @rdname ard_vif
Expand Down Expand Up @@ -52,7 +54,7 @@ ard_vif <- function(x) {
tidyr::pivot_longer(
cols = -c("variable"),
names_to = "stat_name",
values_to = "statistic"
values_to = "stat"
) |>
dplyr::mutate(
context = "vif",
Expand Down
4 changes: 3 additions & 1 deletion man/ard_vif.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions tests/testthat/_snaps/ard_vif.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Message
{cards} data frame: 6 x 7
Output
variable context stat_name stat_label statistic
1 ARM vif GVIF GVIF 1.015675
2 ARM vif df df 2.000000
3 ARM vif aGVIF Adjusted… 1.003896
4 SEX vif GVIF GVIF 1.015675
5 SEX vif df df 1.000000
6 SEX vif aGVIF Adjusted… 1.007807
variable context stat_name stat_label stat
1 ARM vif GVIF GVIF 1.016
2 ARM vif df df 2
3 ARM vif aGVIF Adjusted… 1.004
4 SEX vif GVIF GVIF 1.016
5 SEX vif df df 1
6 SEX vif aGVIF Adjusted… 1.008
Message
i 2 more variables: warning, error

Expand All @@ -22,9 +22,9 @@
Message
{cards} data frame: 2 x 7
Output
variable context stat_name stat_label error statistic
1 ARMXanomeline High Dose vif VIF VIF model co… NULL
2 ARMXanomeline Low Dose vif VIF VIF model co… NULL
variable context stat_name stat_label stat error
1 ARMXanomeline High Dose vif VIF VIF model co…
2 ARMXanomeline Low Dose vif VIF VIF model co…
Message
i 1 more variable: warning

0 comments on commit 2c26294

Please sign in to comment.