1.5 NA
NA
é uma constante lógica de tamanho 1 que contém um indicador de valor faltante. A codificação NA
pode identificar três situações.
- ‘Not Available’: não disponível. Ex.: Perguntar ‘que horas são?’ e não haver relógio disponível.
- ‘Not Applicable’: não aplicável. Ex.: o senhor está grávido?
- ‘Not Announced’: não anunciado. Ex.: ficar em silêncio em um interrogatório.
## [1] NA 1 2 3 NA 1000
## [1] TRUE FALSE FALSE FALSE TRUE FALSE
## [1] 2
## [1] TRUE
A biblioteca VIM
de (Kowarik and Templ 2016) fornece ferramentas para visualização de valores faltantes e imputados.
##
## Variables sorted by number of missings:
## Variable Count
## NonD 0.22580645
## Dream 0.19354839
## Sleep 0.06451613
## Span 0.06451613
## Gest 0.06451613
## BodyWgt 0.00000000
## BrainWgt 0.00000000
## Pred 0.00000000
## Exp 0.00000000
## Danger 0.00000000
##
## Missings in variables:
## Variable Count
## NonD 14
## Dream 12
## Sleep 4
## Span 4
## Gest 4
##
## Missings per variable:
## Variable Count
## BodyWgt 0
## BrainWgt 0
## NonD 14
## Dream 12
## Sleep 4
## Span 4
## Gest 4
## Pred 0
## Exp 0
## Danger 0
##
## Missings in combinations of variables:
## Combinations Count Percent
## 0:0:0:0:0:0:0:0:0:0 42 67.741935
## 0:0:0:0:0:0:1:0:0:0 3 4.838710
## 0:0:0:0:0:1:0:0:0:0 2 3.225806
## 0:0:0:0:0:1:1:0:0:0 1 1.612903
## 0:0:1:0:1:0:0:0:0:0 2 3.225806
## 0:0:1:1:0:0:0:0:0:0 9 14.516129
## 0:0:1:1:0:1:0:0:0:0 1 1.612903
## 0:0:1:1:1:0:0:0:0:0 2 3.225806
References
Kowarik, Alexander, and Matthias Templ. 2016. “Imputation with the R Package VIM.” Journal of Statistical Software 74 (7): 1–16. https://doi.org/10.18637/jss.v074.i07.