Recover the parameters specifying the variational
approximation to the posterior distribution of the regression
coefficients. To streamline the model fitting implementation, and
to reduce memory requirements, mr.ash does not store
all the parameters needed to specify the approximate posterior.
Value
A list object with the following elements:
- phi
An p x K matrix containing the posterior assignment probabilities, where p is the number of predictors, and K is the number of mixture components. (Each row of
phishould sum to 1.)- m
An p x K matrix containing the posterior means conditional on assignment to each mixture component.
- s2
An p x K matrix containing the posterior variances conditional on assignment to each mixture component.
Examples
## generate synthetic data
set.seed(1)
n = 200
p = 300
X = matrix(rnorm(n*p),n,p)
beta = double(p)
beta[1:10] = 1:10
y = X %*% beta + rnorm(n)
## fit mr.ash
fit.mr.ash = mr.ash(X, y)
#> Mr.ASH terminated at iteration 25: max|beta|=1.0032e+01, sigma2=3.0601e+00, pi0=0.7703
## recover full posterior
full.post = get.full.posterior(fit.mr.ash)