Compute Weights Using Dirichlet Process Regression (RcppDPR)
Source:R/regularized_regression.R
dpr_weights.RdFits a Dirichlet Process Regression model via `RcppDPR::fit_model` and returns the per-variant weights, computed as `beta + alpha` (matching `RcppDPR:::predict.DPR_Model`, which uses `(beta + alpha)
Usage
dpr_weights(X, y, fitting_method = "VB", retain_fit = FALSE, ...)
dpr_vb_weights(X, y, n_k = 8, retain_fit = FALSE, ...)
dpr_gibbs_weights(X, y, s_step = 5000, retain_fit = FALSE, ...)
dpr_adaptive_gibbs_weights(X, y, retain_fit = FALSE, ...)Details
By default the variational Bayes (`VB`) fitting method is used, which is fast and deterministic. The user may switch to `Gibbs` or `Adaptive_Gibbs` for full Bayesian MCMC inference. `rotate_variables` is held to `FALSE` under the assumption that any covariates have already been regressed out upstream; an intercept-only covariate matrix is supplied to `fit_model`.