Description Usage Arguments Details Author(s) See Also Examples
Returns some information about the incomplete data set and the imputation process.
1 2 |
object |
Either with |
... |
Arguments to be passed to or from other functions. |
Returns information about the percentage of missing data as well as about the imputation variant, the number of (multiple) imputations and the number of iterations between two imputations.
Florian Meinfelder
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ### sample data set with non-normal variables and two different
### missingness patterns
n <- 50
x1 <- round(runif(n,0.5,3.5))
x2 <- as.factor(c(rep(1,10),rep(2,25),rep(3,15)))
x3 <- round(rnorm(n,0,3))
y1 <- round(x1-0.25*(x2==2)+0.5*x3+rnorm(n,0,1))
y1 <- ifelse(y1<1,1,y1)
y1 <- as.factor(ifelse(y1>4,5,y1))
y2 <- x1+rnorm(n,0,0.5)
y3 <- round(x3+rnorm(n,0,2))
data1 <- as.data.frame(cbind(x1,x2,x3,y1,y2,y3))
misrow1 <- sample(n,20)
misrow2 <- sample(n,15)
misrow3 <- sample(n,10)
is.na(data1[misrow1, 4]) <- TRUE
is.na(data1[misrow2, 5]) <- TRUE
is.na(data1[misrow2, 6]) <- TRUE
### imputation
imputed.data <- BBPMM(data1, nIter=5, M=5)
summary(imputed.data)
|
Loading required package: Rcpp
Warning in BBPMM(data1, nIter = 5, M = 5) :
Small data sets can reduce the quality of the predictive mean match.
[1] "number of missing values x1: 0" "number of missing values x2: 0"
[3] "number of missing values x3: 0" "number of missing values y1: 20"
[5] "number of missing values y2: 15" "number of missing values y3: 15"
Imputation 1 of 5: iteration 1
Variable: y2 y3 y1
Imputation 1 of 5: iteration 2
Variable: y2 y3 y1
Imputation 1 of 5: iteration 3
Variable: y2 y3 y1
Imputation 1 of 5: iteration 4
Variable: y2 y3 y1
Imputation 1 of 5: iteration 5
Variable: y2 y3 y1
Imputation 2 of 5: iteration 1
Variable: y2 y3 y1
Imputation 2 of 5: iteration 2
Variable: y2 y3 y1
Imputation 2 of 5: iteration 3
Variable: y2 y3 y1
Imputation 2 of 5: iteration 4
Variable: y2 y3 y1
Imputation 2 of 5: iteration 5
Variable: y2 y3 y1
Imputation 3 of 5: iteration 1
Variable: y2 y3 y1
Imputation 3 of 5: iteration 2
Variable: y2 y3 y1
Imputation 3 of 5: iteration 3
Variable: y2 y3 y1
Imputation 3 of 5: iteration 4
Variable: y2 y3 y1
Imputation 3 of 5: iteration 5
Variable: y2 y3 y1
Imputation 4 of 5: iteration 1
Variable: y2 y3 y1
Imputation 4 of 5: iteration 2
Variable: y2 y3 y1
Imputation 4 of 5: iteration 3
Variable: y2 y3 y1
Imputation 4 of 5: iteration 4
Variable: y2 y3 y1
Imputation 4 of 5: iteration 5
Variable: y2 y3 y1
Imputation 5 of 5: iteration 1
Variable: y2 y3 y1
Imputation 5 of 5: iteration 2
Variable: y2 y3 y1
Imputation 5 of 5: iteration 3
Variable: y2 y3 y1
Imputation 5 of 5: iteration 4
Variable: y2 y3 y1
Imputation 5 of 5: iteration 5
Variable: y2 y3 y1
16.7 % missing values in the original data
Imputation variant: multiple imputation
Number of multiple imputations: 5
Number of iterations between stored imputations: 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.