Learn R Programming

rmsb (version 1.1-1)

PostF: Function Generator for Posterior Probabilities of Assertions

Description

From a Bayesian fit object such as that from blrm() generates an R function for evaluating the probability that an assertion is true. The probability, within simulation error, is the proportion of times the assertion is true over the posterior draws. If the assertion does not evaluate to a logical or 0/1 quantity, it is taken as a continuous derived parameter and the vector of draws for that parameter is returned and can be passed to the PostF plot method. PostF can also be used on objects created by contrast.rms

Usage

PostF(fit, name = c("short", "orig"), pr = FALSE)

Value

an R function

Arguments

fit

a Bayesian fit or contrast.rms object

name

specifies whether assertions will refer to shortened parameter names (the default) or original names. Shorted names are of the form a1, ..., ak where k is the number of intercepts in the model, and b1, ..., bp where p is the number of non-intercepts. When using original names that are not legal R variable names, you must enclose them in backticks. For contrast objects, name is ignored and you must use contrast names. The cnames argument to contrast.rms is handy for assigning your own names.

pr

set to TRUE to have a table of short names and original names printed when name='short'. For contrasts the contrast names are printed if pr=TRUE.

Author

Frank Harrell