R/predPoint.R

Defines functions predPoint

predPoint <- function(object, Xnew, model) {
  if(model=="MAP") {
    beta <- object$beta.map
  } else if (model=="WAM") {
    beta <- object$beta.wam
  } else {
    cat("model must be \"MAP\" or \"WAM\".")
  }
  y.pred <- beta[1] + Xnew %*% beta[-1]
  return(y.pred)
}
dongjli/bravo documentation built on Sept. 20, 2021, 3:33 a.m.