calc_qi: Calculate a quantity of interest from objects of class...

Description Usage Arguments Details References

Description

calc_qi() calculates a quantity of interest from objects of class "post."

Usage

1
calc_qi(post, X_pred_list, prob = 0.9, qi_name = "pr", ci_type = "hpd")

Arguments

post

An object of class "post" created by one of the sim_post_*() functions.

X_pred_list

A named list, where the names correspond to variable names and the values correspond to values at which to set the variables. Only one element of the list should have more than one value. If qi_name = "rr" or qi_name = "rr" (see below), then one variable should have exactly two values and the rest should have exactly one.

prob

A numeric scalar in the interval (0,1) giving the target probability content of the intervals.

qi_name

The name of the quantity of interest to calculate. Either "pr" (predicted probability), "rr" (risk-ratio), or "fd" (first-difference). Defaults to "pr".

ci_type

The type of confidence interval to compute. Either "hpd" (highest posterior density) or "et" (equal-tailed). Defaults to "hpd".

Details

Researchers can use this function to convert posterior simulations of the logistic regression coefficients to quantities of interest, such as predicted probabilities, risk-ratios, and first-differences.

References

Rainey, Carlisle. "Dealing with Separation in Logistic Regression Model." Working paper. Available at http://crain.co/papers/separation.pdf.


carlislerainey/separation documentation built on May 13, 2019, 12:45 p.m.