R amelia()


개요

R amelia()
library(Amelia)
data(africa)
a <- amelia(x = africa, cs = "country", ts = "year", logs = "gdp_pc")
## -- Imputation 1 --
## 
##   1  2
## 
## -- Imputation 2 --
## 
##   1  2  3
## 
## -- Imputation 3 --
## 
##   1  2  3
## 
## -- Imputation 4 --
## 
##   1  2
## 
## -- Imputation 5 --
## 
##   1  2

summary(a)
## 
## Amelia output with 5 imputed datasets.
## Return code:  1 
## Message:  Normal EM convergence. 
## 
## Chain Lengths:
## --------------
## Imputation 1:  2
## Imputation 2:  3
## Imputation 3:  3
## Imputation 4:  2
## Imputation 5:  2
## 
## Rows after Listwise Deletion:  115 
## Rows after Imputation:  120 
## Patterns of missingness in the data:  3 
## 
## Fraction Missing for original variables: 
## -----------------------------------------
## 
##            Fraction Missing
## year             0.00000000
## country          0.00000000
## gdp_pc           0.01666667
## infl             0.00000000
## trade            0.04166667
## civlib           0.00000000
## population       0.00000000

plot(a)

같이 보기

참고