Revision 59ff873ea3ba72971eea37468630c07afdf517a2 authored by Matthias Templ on 11 January 2011, 09:31:03 UTC, committed by cran-robot on 11 January 2011, 09:31:03 UTC
1 parent 128cc5e
Raw File
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
}
back to top