coef.mr.ash | R Documentation |
Retrieve posterior mean estimates of the regression coefficients in a Mr.ASH model.
## S3 method for class 'mr.ash'
coef(object, ...)
object |
A Mr.ASH fit, usually the result of calling
|
... |
Additional arguments passed to the default S3 method. |
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 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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.