Retrieve posterior mean estimates of the regression coefficients in a Mr.ASH model.

# S3 method for mr.ash
coef(object, ...)

Arguments

object

A Mr.ASH fit, usually the result of calling mr.ash.

...

Additional arguments passed to the default S3 method.

Value

A p+1 vector. The first element gives the estimated intercept, and the remaining p elements are the estimated regression coefficients.

## 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

## fit mr.ash model fit.mr.ash = mr_ash(X, y)

## coefficient coef.mr.ash = coef(fit.mr.ash) intercept = coef.mr.ash[1] beta = coef.mr.ash[-1]