Package index
Convert, open, and join
Prepare annual files, open them in DuckDB, and select or label analysis fields.
-
nis_convert() - Convert a NIS file to annual Parquet
-
nis_open() - Open annual NIS Parquet files lazily
-
nis_join_companion() - Join an annual NIS companion file
-
nis_example() - Create invented NIS Parquet files
-
nis_label() - Apply HCUP labels
-
nis_vars_design()nis_vars_demographics()nis_vars_dx()nis_vars_pr()nis_vars_hospital() - Select NIS column groups
-
nis_flag_dx() - Add diagnosis code flags
-
nis_flag_pr() - Add procedure code flags
-
nis_flag_pr_timing() - Flag procedure timing relative to an index procedure
-
nis_add_ccsr() - Add CCSR categories to a NIS query
-
nis_ccsr_codes() - Find ICD-10 codes in a CCSR category
-
nis_attrition()nis_attrition_cohort() - Count discharges at each eligibility step
-
nis_write_cohort() - Save a reusable NIS cohort
Audit coding and completeness
Compare code frequencies, diagnosis positions, and procedure-day coverage.
-
nis_audit_code_transition() - Audit code-group frequencies across periods
-
nis_audit_dx_position() - Compare principal and any-slot diagnosis matches
-
nis_audit_prday() - Check procedure-day completeness
Derive outcomes, comorbidities, and costs
Add discharge outcomes, score comorbidities, and express costs in a common dollar year.
-
nis_outcomes() - Add standard discharge outcomes
-
nis_comorbidity() - Add comorbidity indicators and scores (experimental)
-
nis_comorbidity_condition_map() - Map comorbidity output flags to distinct conditions
-
nis_cost() - Adjust NIS charges and costs to a reference dollar year
-
nis_cost_provenance() - Read cost adjustment provenance
Estimate with the survey design
Build cohort or whole-sample designs, estimate annual totals, and report the fitted sample.
-
nis_design() - Prepare a cohort survey design
-
nis_survey() - Create a lazy whole-sample NIS survey design
-
nis_annual_totals() - Estimate annual national discharge totals
-
nis_reweight() - Reweight a cohort survey design
-
nis_design_report() - Report the survey design and fitted sample
Check disclosure
Count supporting discharges and hospitals, mask small cells, and scan publication files.
-
nis_cell_counts() - Count discharges and contributing hospitals by cell
-
nis_suppress() - Mask cells with insufficient disclosure support
-
nis_scan_outputs() - Scan a publication folder for disclosure risks
Start a reproducible study
Create a Quarto project with a sample analysis and a disclosure checklist.
-
nis_new_study() - Create a Quarto study