View source: R/parameter_NBKP.R
| parameter | R Documentation |
Retrieve the key model parameters from a fitted NBKP object.
This includes the optimized kernel hyperparameters, posterior Gamma parameters,
and the negative‑binomial dispersion parameter.
parameter(object, ...)
## S3 method for class 'NBKP'
parameter(object, ...)
object |
An object of class |
... |
Additional arguments (currently unused). |
A named list containing:
theta: Estimated kernel hyperparameters.
phi: Negative‑binomial dispersion parameter.
alpha_n: Posterior Gamma \alpha parameters.
beta_n: Posterior Gamma \beta parameters.
Zhao J, Qing K, Xu J (2025). BKP: An R Package for Beta Kernel Process Modeling. arXiv. https://doi.org/10.48550/arxiv.2508.10447.
fit_NBKP for fitting NBKP models.
set.seed(123)
# Define true mean function
true_mu_fun <- function(x) {
exp(sin(x) + 0.5)
}
n <- 30
Xbounds <- matrix(c(-2, 2), nrow = 1)
X <- tgp::lhs(n = n, rect = Xbounds)
true_mu <- true_mu_fun(X)
y <- rnbinom(n, size = 1, mu = true_mu)
# Fit NBKP model
model <- fit_NBKP(X, y, Xbounds = Xbounds)
# Extract posterior and kernel parameters
parameter(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.