coef.blm: Coefficients

Description Usage Arguments Value Examples

Description

Coefficients from the posterior distribution of a bayesian model.

Usage

1
2
## S3 method for class 'blm'
coef(object, covar = FALSE, ...)

Arguments

object

a blm object.

covar

return the covariance matrix instead of estimates for the coefficients?

...

other arguments (currently ignored).

Value

A named vector for the maxium a posteriori likelihood of coefficients. That is, means of the posterior distribution of the coefficients of the object. To get the covariance matrix for the coefficients use covar.blm.

Examples

1
2
3
4
5
6
7
8
x <- rnorm(10)
b <- 1.3
w0 <- 0.2 ; w1 <- 3
y <- rnorm(10, mean = w0 + w1 * x, sd = sqrt(1/b))
model <- blm(y ~ x, prior = NULL, beta = b, data = data.frame(x=x, y=y))

coef(model)
coefficients(model)

manschmi/blmr documentation built on May 21, 2019, 11:25 a.m.