residuals.blm: Residuals of Bayesian Linear Model

Description Usage Arguments Details Value Examples

Description

residuals.blm returns residuals for a bayesian linear model.

Usage

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

Arguments

object

a blm object.

var

Report also variance for the fitted values.

...

other arguments (currently ignored).

Details

Residuals are extracted from the maxium a posterior estimate of the blm object. If var = TRUE, a list containing means and variances of the fitted values.

Value

Residuals of the blm object.

Examples

1
2
3
4
5
6
7
8
9
  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))
  
  residuals(model)
  resid(model)
  

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