Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

posterior_linpred

Generic function for accessing the posterior distribution of the linear predictor


Description

Extract the posterior draws of the linear predictor, possibly transformed by the inverse-link function. See posterior_linpred.stanreg() in the rstanarm package for an example.

Usage

posterior_linpred(object, transform = FALSE, ...)

Arguments

object

The object to use.

transform

Should the linear predictor be transformed using the inverse-link function? The default is FALSE, in which case the untransformed linear predictor is returned.

...

Arguments passed to methods. See the methods in the rstanarm package for examples.

Value

posterior_linpred() methods should return a D by N matrix, where D is the number of draws from the posterior distribution distribution and N is the number of data points.

See Also

  • Guidelines and recommendations for developers of R packages interfacing with Stan and a demonstration getting a simple package working can be found in the vignettes included with rstantools and at mc-stan.org/rstantools/articles.

Examples

# See help("posterior_linpred", package = "rstanarm")

rstantools

Tools for Developing R Packages Interfacing with 'Stan'

v2.1.1
GPL (>= 3)
Authors
Jonah Gabry [aut, cre], Ben Goodrich [aut], Martin Lysy [aut], Stefan Siegert [ctb], Trustees of Columbia University [cph]
Initial release
2020-07-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.