Skip to contents

Calculates the summary of missingness in a data set.

Usage

calcmissing(obj, ...)

# S3 method for class 'data.frame'
calcmissing(obj, MRO.case = FALSE, ...)

# S3 method for class 'mro'
calcmissing(obj, ...)

Arguments

obj

An object

...

additional arguments

MRO.case

does something with rownames

Value

Missing value object

Methods (by class)

  • calcmissing(data.frame): Method for a dataframe

  • calcmissing(mro): accepts a whole mr.object , which is first mro.mat, second element labels, third element the input data frame.

See also

plotcombn

Author

Junjie Zeng

Examples

calcmissing(census.at.school.5000[, 1:20])
#> # Number and percent of missing variables in each variable
#> 
#>            gender  age country_en country_mi height languages ethnicother_mi
#> count          15   26         39         39    220       227            445
#> percentage   0.3% 0.5%       0.8%       0.8%   4.4%      4.5%           8.9%
#>            Total
#> count       5000
#> percentage  100%
#> 
#> 
#> # Combinations of missing values:
#> 
#>       gender age country_en country_mi height languages ethnicother_mi Freq
#>            1   1          1          1      1         1              1 4109
#>            1   1          1          1      1         1              0  390
#>            1   1          1          1      1         0              1  191
#>            1   1          1          1      0         1              1  183
#>            1   1          0          0      1         1              1   22
#>            1   0          1          1      1         1              1   21
#>            1   1          1          1      0         1              0   18
#>            1   1          1          1      1         0              0   16
#>            1   1          1          1      0         0              1   14
#>            1   1          0          0      1         1              0   13
#>            0   1          1          1      1         1              1   10
#>            0   1          1          1      1         1              0    3
#>            1   1          1          1      0         0              0    1
#>            1   1          0          0      1         0              1    1
#>            1   1          0          0      1         0              0    1
#>            1   1          0          0      0         0              0    1
#>            1   0          1          1      0         1              1    1
#>            1   0          1          1      1         0              1    1
#>            1   0          1          1      0         1              0    1
#>            1   0          0          0      1         0              0    1
#>            0   1          1          1      0         1              1    1
#>            0   0          1          1      1         1              1    1
#> Total     15  26         39         39    220       227            445 5000
#>       Percentage
#>             82.2
#>              7.8
#>              3.8
#>              3.7
#>              0.4
#>              0.4
#>              0.4
#>              0.3
#>              0.3
#>              0.3
#>              0.2
#>              0.1
#>              0.0
#>              0.0
#>              0.0
#>              0.0
#>              0.0
#>              0.0
#>              0.0
#>              0.0
#>              0.0
#>              0.0
#> Total      100.0