| missing_compare | R Documentation |
Compare missing data
missing_compare( .data, dependent, explanatory, p = TRUE, na_include = FALSE, ... )
.data |
Dataframe. |
dependent |
Variable to test missingness against other variables with. |
explanatory |
Variables to have missingness tested against. |
p |
Logical: Include null hypothesis statistical test. |
na_include |
Include missing data in explanatory variables as a factor level. |
... |
Other arguments to |
A dataframe comparing missing data in the dependent variable across explanatory variables. Continuous data are compared with an Analysis of Variance F-test by default. Discrete data are compared with a chi-squared test.
library(finalfit)
explanatory = c("age", "age.factor", "extent.factor", "perfor.factor")
dependent = "mort_5yr"
colon_s %>%
ff_glimpse(dependent, explanatory)
colon_s %>%
missing_pattern(dependent, explanatory)
colon_s %>%
missing_compare(dependent, explanatory)