precision_summary
precision_summary(data=None, *columns, z=Z_95)Plain-language survey precision summary.
Distils a whole survey’s sampling precision into a few bullet points: the narrative “Data info” paragraph from a report appendix, generated automatically. Rather than make you choose which variables to quote precision for, this picks them: numeric columns become point estimates (margins in rating points) and categorical columns become proportions (margins in percentage points), with free-text and id-like columns skipped. It then reports the typical and worst margins across each group, plus an overall verdict from the median relative standard error via rse_rating(). For proportions it also gives the worst-case margin at a 50/50 split, which is the widest any percentage in the study can be.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| data | pandas.DataFrame | A data frame. If omitted, the session default is used. | None |
| *columns | str or selector | Columns to restrict the assessment to. If omitted, all suitable columns are used: every numeric column, and every categorical column that is not free text or an identifier. | () |
| z | float | Confidence multiplier for the margins of error. Default 1.96 (95%). | Z_95 |
Returns
| Name | Type | Description |
|---|---|---|
| EzrsurveyPrecision | A dict with n, the per-variable table, overall_rse, rating and the bullets. Printing it shows the bullet points. |
See Also
diagnose, rse_rating
Examples
>>> precision_summary(podracing_survey)