summarise.lincomb: Compute the posterior distribution for a linear combination...

Description Usage Arguments Value Author(s) Examples

View source: R/summarise.lincomb.R

Description

This function takes in a ‘carbayes’ model object and computes the posterior distribution and posterior quantiles of a linear combination of the covariates from the linear predictor. For example, if a quadratic effect of a covariate on the response was specified, then this function allows you to compute the posterior distribution of the quadratic relationship.

Usage

1
summarise.lincomb(model, columns=NULL, quantiles=0.5, distribution=FALSE)

Arguments

model

A ‘carbayes’ model object from fitting one of the models in this package.

columns

A vector of column numbers stating which columns in the design matrix of covariates the posterior distribution should be computed for.

quantiles

The vector of posterior quantiles required.

distribution

A logical value stating whether the entire posterior distribution should be returned or just the specified quantiles.

Value

quantiles

A 2 dimensional array containing the requied posterior quantiles. Each row relates to a data value, and each column to a different requested quantile.

posterior

A 2 dimensional array containing the requied posterior distribution. Each column relates to a different data value.

Author(s)

Duncan Lee

Examples

1
## See the vignette accompanying this package for an example of its use.

duncanplee/CARBayes documentation built on June 5, 2017, 3:20 a.m.