R/SIMVN_train.R

Defines functions SIMVN_train

Documented in SIMVN_train

#' Estimate data mean and variance for imputation
#'
#' norm::rngseed MUST be run before the function is used, otherwise it will not work
#' @param X A data matrix.
#' @param verbose A boolean: whether or not to print EM iterations
#' @return A list with the estimated mean and variance for the data
#' @export SIMVN_train
SIMVN_train = function(X, verbose=F){
  # Must run *rngseed* at least once before using
  pre <- prelim.norm2(as.matrix(X))
  thetahat <- norm::em.norm(pre, showits=verbose)
  params = norm::getparam.norm(pre,thetahat)
  return(params)
}
Anogio/SIMVN documentation built on May 26, 2019, 2:35 a.m.