View source: R/sparse_linear_summary.R
sparse_linear_summary | R Documentation |
Sparse linear summary
sparse_linear_summary( X, fhatmat = X %*% betaSamples, betaSamples, sigma2Samples = NA, adaptive = TRUE, varnames = NA, alpha = 0.05, ... )
X |
N \times p design matrix |
fhatmat |
N \times NMC matrix of posterior draws of the function f, where N is the number of observations and NMC is the number of Monte Carlo posterior samples. The user must specify fhatmat OR betaSamples |
betaSamples |
p \times NMC matrix of posterior draws of the coefficients for the (generalized) linear model |
sigma2Samples |
Optional vector of posterior samples for the residual variance (for a linear model) |
adaptive |
if TRUE (default), use adaptive lasso, weighting by the posterior mean. See Hahn and Carvalho (2015) |
varnames |
Optional vector of variable names |
alpha |
Return the alpha/2 and 1-alpha/2 posterior credible intervals for the summary |
... |
other arguments, e.g., to glmnet |
Compute a sparse linear summary of a nonparametric regression model or high-dimensional (generalized) linear model
Spencer Woody
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.