Skip to contents

Fits a Dirichlet Process Regression model via `RcppDPR::fit_model` and returns the per-variant weights, computed as `beta + alpha` (matching RcppDPR's internal `predict.DPR_Model`, which uses `(beta + alpha)

Usage

dprWeights(X, y, fittingMethod = "VB", retainFit = FALSE, ...)

dprVbWeights(X, y, nK = 8, retainFit = FALSE, ...)

dprGibbsWeights(X, y, sStep = 5000, retainFit = FALSE, ...)

dprAdaptiveGibbsWeights(X, y, retainFit = FALSE, ...)

Arguments

X

A numeric matrix of predictors.

y

A numeric response vector.

fittingMethod

One of "VB", "Gibbs", or "Adaptive_Gibbs". Default is "VB".

...

Additional arguments passed through to `RcppDPR::fit_model`.

Value

A numeric vector of length `ncol(X)` of variant weights.

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`.