pool.R2.Rd
With (nested) multiple imputations, the determination coefficient \(R^2\) has to be
computed for each imputed data set and pooled afterwards. pool.R2
provide pooling routines
according to Harel (2009). The function requires that the \(R^2\) coefficients from the multiple imputed
analyses are already available.
pool.R2 ( r2, N, verbose = TRUE )
For multiple imputed data, a numeric vector of \(R^2\) values. For nested multiple imputed data, a list of numeric vectors of \(R^2\) values. The number of list elements must correspond to the number of nests. The number of \(R^2\) values within each list element must be equal and must correspond to the number of imputations within each nest.
Optional: the sample size of each imputed data set. Only necessary if the standard error for the pooled \(R^2\)
should be computed. The structure of the N
object must correspond to the structure of the r2
object. See examples for further details.
Optional: Print additional messages to console?
Returns a data.frame with one or two columns which contains the pooled \(R^2\) value and optionally it's standard error.
Harel, O. (2009): The estimation of \(R^2\) and adjusted \(R^2\) in incomplete data sets using multiple imputation. Journal of Applied Statistics. 36, 10, 1109–1118.
# multiple imputation, assume that the regression analysis was fitted for five imputed data sets,
# resulting in five R^2 values. Assume sample sizes of 340
r2 <- c(0.12395, 0.15261, 0.16125, 0.11029, 0.1871)
Ns <- rep(340,5)
pool.R2 ( r2=r2, N=Ns)
#> m.pooled se.pooled
#> 1 0.1461977 0.002639094
# without standard error
pool.R2 ( r2=r2)
#> No sample sizes given. Will not compute standard error of pooled R squared.
#> m.pooled
#> 1 0.1461977
# nested multiple imputation
r2 <- list(nest1 = c(0.12395, 0.15261, 0.16125, 0.11029, 0.1871),
nest2 = c(0.10603, 0.08876, 0.09248, 0.13331, 0.1114),
nest3 = c(0.17228, 0.25203, 0.13132, 0.23331, 0.10069))
Ns <- lapply(1:3, FUN = function (x) {rep(290, 5)})
pool.R2 ( r2=r2, N=Ns)
#> m.pooled se.pooled
#> 1 0.1414264 0.007142926
# without standard error
pool.R2 ( r2=r2)
#> No sample sizes given. Will not compute standard error of pooled R squared.
#> m.pooled
#> 1 0.1414264