knitr::opts_chunk$set(echo = FALSE, results = "markup", include = TRUE, fig.height = 10, fig.width = 10, warning = FALSE, message = FALSE)
require(shiny)
cat(sprintf("# %d. Multiple Imputation using Chained Equations - MICE\n", params$InputData$RunIdx))
maleAllXCols <- params$InputData$Artifacts$M$X_COLS$All
maleKeptXCols <- params$InputData$Artifacts$M$X_COLS$Kept
femaleAllXCols <- params$InputData$Artifacts$F$X_COLS$All
femaleKeptXCols <- params$InputData$Artifacts$F$X_COLS$Kept
otherAllXCols <- params$InputData$Artifacts$O$X_COLS$All
otherKeptXCols <- params$InputData$Artifacts$O$X_COLS$Kept

maleRemovedXCols <- setdiff(maleAllXCols, maleKeptXCols) 
femaleRemovedXCols <- setdiff(femaleAllXCols, femaleKeptXCols)
otherRemovedXCols <- setdiff(otherAllXCols, otherKeptXCols)

maleAllYCols <- params$InputData$Artifacts$M$Y_COLS$All
maleKeptYCols <- params$InputData$Artifacts$M$Y_COLS$Kept
femaleAllYCols <- params$InputData$Artifacts$F$Y_COLS$All
femaleKeptYCols <- params$InputData$Artifacts$F$Y_COLS$Kept
otherAllYCols <- params$InputData$Artifacts$O$Y_COLS$All
otherKeptYCols <- params$InputData$Artifacts$O$Y_COLS$Kept

maleRemovedYCols <- setdiff(maleAllYCols, maleKeptYCols)
femaleRemovedYCols <- setdiff(femaleAllYCols, femaleKeptYCols)
otherRemovedYCols <- setdiff(otherAllYCols, otherKeptYCols)

if (length(maleRemovedXCols) > 0 | length(maleRemovedYCols) > 0 | 
    length(femaleRemovedXCols) > 0 | length(femaleRemovedYCols) > 0 | 
    length(otherRemovedXCols) > 0 | length(otherRemovedYCols) > 0) {
  cat("<p>Some attributes in the input data have not been processed with this adjustment due to insufficient data:</p>",
      "<ul>")
  if (length(maleRemovedXCols) > 0 | length(maleRemovedYCols) > 0) {
    cat("<li>Male gender<ul>")
    if (length(maleRemovedXCols) > 0) {
      cat("<li>Covariates: ", maleRemovedXCols, "</li>")
    }
    if (length(maleRemovedYCols) > 0) {
      cat("<li>Outputs: ", maleRemovedYCols, "</li>")
    }
    cat("</ul></li>")
  }
  if (length(femaleRemovedXCols) > 0 | length(femaleRemovedYCols) > 0) {
    cat("<li>Female gender<ul>")
    if (length(femaleRemovedXCols) > 0) {
      cat("<li>Covariates: ", femaleRemovedXCols, "</li>")
    }
    if (length(femaleRemovedYCols) > 0) {
      cat("<li>Outputs: ", femaleRemovedYCols, "</li>")
    }
    cat("</ul></li>")
  }
  if (length(otherRemovedXCols) > 0 | length(otherRemovedYCols) > 0) {
    cat("<li>Other gender<ul>")
    if (length(otherRemovedXCols) > 0) {
      cat("<li>Covariates: ", otherRemovedXCols, "</li>")
    }
    if (length(otherRemovedYCols) > 0) {
      cat("<li>Outputs: ", otherRemovedYCols, "</li>")
    }
    cat("</ul></li>")
  }

  cat("</ul>")
}

Maximum 5 first chains (imputations) are displayed.

wzxhzdk:3


nextpagesoft/hivEstimatesAccuracyReloaded documentation built on March 14, 2020, 7:06 a.m.