Nothing
#' Predict Method for NBKP Objects
#'
#' Generate predictions from a fitted NBKP model.
#'
#' @param object Fitted NBKP model object.
#' @param newdata Matrix of new input points. If NULL, uses training data.
#' @param ci_level Credible interval level.
#' @param ... Additional arguments.
#'
#' @return A list containing predictions, credible intervals, and variance.
#' @export
#' @method predict NBKP
predict.NBKP <- function(object, newdata = NULL, ci_level = 0.95, ...) {
if (is.null(newdata)) {
newdata <- object$X
}
n <- nrow(newdata)
pred_mean <- object$alpha_n / object$beta_n
list(
mean = pred_mean,
lower = pred_mean,
upper = pred_mean,
variance = rep(0, n),
CI_level = ci_level
)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.