This function creates a caterpillar plot to visualize the standardized measures (indirect or direct).
The input CI
must be a dataframe output from package pprof
's confint
function.
Each provider's standardized measure value is represented as a point, and a reference line is shown at the value specified by refline_value
(default is NULL).
If refline_value
is not specified, for linear FE or RE models with indirect or direct standardized differences, it will be set to 0;
for logistic FE models with indirect or direct ratios, it will be set to 1;
and for logistic FE with indirect or direct rates, it will be set to the population rate, which represents the average rate across all observations.
Confidence intervals (CI) are displayed as error bars: for alternative = "two.sided"
, two-sided confidence intervals are shown;
for alternative = "greater"
, error bars extend from the lower bound to the standardized measure values;
and for alternative = "less"
, they extend from the standardized measure values to the upper bound.
For cases where one side of the confidence interval is infinite, that side only extends to the standardized measure.
For example, in a logistic fixed effect model, if a provider has all 0s or all 1s, one side of the confidence interval will be infinite.
When use_flag = TRUE
, the plot will use colors specified by flag_color
to show the flags of providers.
Each error bar will be colored to reflect the flag, making it easy to identify providers with different performance levels.
When use_flag = FALSE
, all error bars will have the same color, specified by errorbar_color
.
This provides a simpler visualization without flagging individual providers.