https://github.com/cran/robCompositions
Tip revision: 2e8aee4c8c43c9fa1eb67409e968b5280a424f6d authored by Matthias Templ on 06 March 2009, 00:00:00 UTC
version 1.2
version 1.2
Tip revision: 2e8aee4
summary.imp.R
summary.imp <- function(object, ...){
geometricmean <- function (x) {
if (any(na.omit(x == 0)))
0
else exp(mean(log(unclass(x)[is.finite(x) & x > 0])))
}
gm <- apply(object$xOrig, 2, function(x) {
geometricmean(x[complete.cases(x)])
})
gmI <- apply(object$xImp, 2, function(x) {
geometricmean(x[complete.cases(x)]) ## gewichten!
})
d <- data.frame(orig=gm,
imp=gmI)
cat("\n geometric mean of the original data and the imputed data: \n")
## Einfluss der Imputation mittels bootstrap schaetzen
## laut script sim
d
}