Skip to contents

[Stable] mnar() presents the statistics from mar() and mcar(). If at least one p-value in mar() is not significant, and the p-value in mcar() is significant then the data is MNAR.

Usage

mnar(data)

Arguments

data

A data frame

Value

A list:

mcar

Results of Little's MCAR test

mar

Results of MAR test

Details

There exists no formal test for MNAR data. This function therefore presents the statistics for the tests in mar() and mcar(). If the results suggest the data is neither MAR nor MCAR, one can use process of elimination to deduce that the data is MNAR.

Examples

mnar(companydata)
#> Warning: essentially perfect fit: summary may be unreliable
#> Warning: essentially perfect fit: summary may be unreliable
#> $mcar
#> # A tibble: 1 × 4
#>   statistic degrees_freedom  p_val missing_patterns
#>       <dbl>           <dbl>  <dbl>            <int>
#> 1      22.7              11 0.0197                4
#> 
#> $mar
#> # A tibble: 2 × 6
#>   missing        p_value explanatory    p_values     variables    combined    
#>   <chr>            <dbl> <chr>          <named list> <named list> <named list>
#> 1 product_rating  0.103  product_rating <dbl [5]>    <chr [5]>    <dbl [5]>   
#> 2 employees       0.0128 gross_profit   <dbl [5]>    <chr [5]>    <dbl [5]>   
#>