| .fit.blasso | R Documentation |
tidyfitFits a Bayesian Lasso regression on a 'tidyFit' R6 class. The function can be used with regress.
## S3 method for class 'blasso'
.fit(self, data = NULL)
self |
a tidyFit R6 class. |
data |
a data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
Hyperparameters:
None. Cross validation not applicable.
Important method arguments (passed to m)
The function provides a wrapper for monomvn::blasso. See ?blasso for more details.
Implementation
Features are standardized by default with coefficients transformed to the original scale.
A fitted tidyFit class model.
Johann Pfitzinger
Gramacy RB, (qpgen2/quadprog) wFcfCMaubBAT (2023). monomvn: Estimation for MVN and Student-t Data with Monotone Missingness. R package version 1.9-17, https://CRAN.R-project.org/package=monomvn.
.fit.lasso, .fit.bridge and m methods
# Load data
data <- tidyfit::Factor_Industry_Returns
# Stand-alone function
fit <- m("blasso", Return ~ ., data, T = 100)
fit
# Within 'regress' function
fit <- regress(data, Return ~ ., m("blasso", T = 100),
.mask = c("Date", "Industry"))
coef(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.