R/getPooledParams.R

Defines functions getPooledParams

Documented in getPooledParams

# =============================================================================
# Get Pooled Parameters
# earlycapistran@comunidad.unam.mx - July 2020
# =============================================================================

#' @title Get Pooled Parameters
#' 
#' @description  Extracts pooled parameter estimates from a 'mipo' object.
#'
#' @param mipo A 'mipo' object generated by 'mice'
#' @return list
#' @export
#' @usage
#' getPooledParams(mipo)
#' 
#' @importFrom mice is.mipo

getPooledParams <- function(mipo) {
  if (!is.mipo(mipo)) 
    stop("The object must have class 'mipo'")
  a <-mipo$pooled$estimate[1]
  b <- mipo$pooled$estimate[2]
  result <- list(a=a, b=b)
  return(result)
}
earlycapistran/consLettersUtils documentation built on Nov. 22, 2022, 1:22 a.m.