The gt_plt_conf_int() function takes an existing GT object and adds horizontal confidence interval plots to a specified column. Each cell displays a horizontal bar representing the confidence interval, with a dot indicating the mean value. Optionally, the lower and upper confidence interval bounds can be provided directly, or the function can compute them.
If ci_columns is not provided, the function assumes each cell in column contains a list of values and computes the confidence interval using a t-distribution.
Parameters
gt:GT
A GT object to modify.
column:SelectExpr
The column that contains the mean of the sample. This can either be a single number per row, if you have calculated the values ahead of time, or a list of values if you want to calculate the confidence intervals.
ci_columns:SelectExpr | None=None
Optional columns representing the left/right confidence intervals of your sample. If None, the confidence interval will be computed from the data in column using a t-distribution.
ci:float=0.95
The confidence level to use when computing the interval (if ci_columns is None).
width:float | int=100
The width of the confidence interval plot in pixels.