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

Quantile.blrm

Function Generator for Quantiles of Y for blrm()


Description

Creates a function to turn a posterior summarized linear predictor lp (e.g. using posterior mean of intercepts and slopes) computed at the reference intercept into e.g. an estimate of a quantile of Y using the posterior mean of all the intercepts. lptau must be provided when call the created function if the model is a partial proportional odds model.

Usage

## S3 method for class 'blrm'
Quantile(object, codes = FALSE, posterior.summary = c("mean", "median"), ...)

Arguments

object

a blrm() fit

codes

if TRUE, use the integer codes 1,2,…,k for the k-level response in computing the quantile

posterior.summary

defaults to posterior mean; may also specify "median". Must be consistent with the summary used when creating lp.

...

ignored

Value

an R function

Author(s)

Frank Harrell


rmsb

Bayesian Regression Modeling Strategies

v0.0.2
GPL (>= 3)
Authors
Frank Harrell [aut, cre] (<https://orcid.org/0000-0002-8271-5493>), Ben Goodrich [ctb] (contributed Stan code), Ben Bolker [ctb] (wrote original code that is folded into the pdensityContour function), Doug Bates [ctb] (write original code for highest posterior density interval that is folded into the HPDint function)
Initial release
2021-02-27

We don't support your browser anymore

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