analyze_nis
Automatic analysis of NIS databases.
Copyright (c) Eli Blaney 2025. All rights reserved.
If you use this script in a project, you must include Eli Blaney as a co-author. No copying, modifying, or redistribution is permitted.
Usage
To start using this program, contact Eli Blaney for a license key.
Parameters
Please see the example parameters.r file.
Changelog
1.6.1 (2026-01-10)
- Enhancement: Check for NA values in subpopulation and warn about them during GLM anaysis.
1.6.0 (2026-01-10)
- New: DRG support by prefixing group codes with
#.
- Enhancement: Prettier logging.
1.5.11 (2026-01-05)
- Enhancement: Added timestamps to console output.
- Enhancement: Added R version to logfile.
1.5.10 (2026-01-04)
- Bugfix: Fixed error in propensity balance table generation.
1.5.9 (2025-12-06)
- Change: Interaction p-values are temporarily disabled.
- Bugfix: Fixed error in propensity balance table generation.
- Bugfix: Fixed issue where some data would be entirely corrupted.
1.5.8 (2025-12-05)
- Change: Propensity balance tables are now generated at the end of the analysis.
- Enhancement: Improved logging messages
1.5.7 (2025-11-20)
- New: Parameters
predictors and matched.vars can now use pseudo-variable #GROUPS# to indicate all defined group variables except those used for subgroups, interventions, outcomes, and exclusion groups.
- Enhancement: Friendlier logging.
1.5.6 (2025-11-20)
- New: Version checking.
- Bugfix: Copy over Outcomes table to Analysis folder.
- Enhancement: Friendlier file naming and info logging.
1.5.5 (2025-11-19)
- Bugfix: Fixed correlation matrix generation if no population is provided.
- Enhancement: Formatting fixes.
1.5.4 (2025-11-12)
- Change: Correlation matrices are disabled by default.
- Enhancement: Correlation matrices are now compressed losslessly.
- Enhancement:
custom.processing() function is now backwards-compatible.
1.5.3 (2025-11-10)
- New: Allow for modifying columns kept for analysis with
keep option when using custom.processing().
- Change: Propensity scoring is now enabled by default for outcomes that do not specify it.
- Bugfix: Fixed correlation matrices not generating.
1.5.2b (2025-11-09)
- New: Correlation matrices, which can be disabled with optional
correlation.matrix parameter.
- Enhancement: Better error messages.
- Bugfix: Avoid error when creating file that already exists.
1.5.1 (2025-11-07)
- New: Automatically update packages on each run.
- Change: Singleton PSUs are now treated with certainty, as they are designed that way in the NIS.
- Bugfix: Fix error when propensity predictor variables include the name of the propensity treatment variable.
1.5.0 (2025-11-06)
- New: Populate Project and Analysis folder with user-friendly files and structure
- New: Allow propensity stratification with categorical variables
- New: Allow keeping extra variables in datasets with
keep.vars parameter
- Change: Make figures optional with
show.figures parameter
- Change: Make propensity validation optional with
validate.propensity parameter
- Bugfix: Fix errors when there is a single categorical intervention
1.4.0 (2025-10-22)
- Change:
reference.is.none is now ignored in favor of automatically changing the reference to "None" when the propensity scoring is intended to compare the intervention variable to nothing, and the reference is the first listed intervention when the propensity scoring is intended to compare the intervention variables against each other.
1.3.0 (2025-10-14)
- New: Support optional
caliper variable for propensity scoring.
- New: Allow new
family option for each outcome to be used in generalized linear models (GLMs). Refer to the stats package.
- Change: GLMs now default to using a quasi-gamma distribution for continuous outcomes (rather than gaussian, in which right-skew in strictly-positive data can violate normality). This has the side effect of altering the interpretation of coefficients to be multiplicative rather than additive. For binary outcomes, GLMs still default to using a quasibinomial distribution.
- Change: Propensity scoring will report data using raw observations rather than weighted counts.
- Enhancement: Improved reporting in
info.txt
1.2.2 (2025-09-29)
- Enhancement: Improved detection of binary variable coding.
- Bugfix: Fixed error when there are no subgroups.
1.2.1 (2025-09-14)
- Enhancement: Improved warning messages.
- Enhancement: More sensitive error checking.
- Enhancement: More consistent recoding of binary variables.
1.2.0 (2025-09-09)
- Enhancement: Allow mixing primary diagnosis (I10_DX1) with procedure codes for primary.dx when is.procedure is
TRUE.
- Enhancement: Detect incompatible intervention or propensity treatment variables, and provide a warning with solution.
- Bugfix: Fix error thrown for missing intervention values.
1.1.4ab (2025-09-03)
- Bugfix: Fixed case where intervention does not appear in analysis.
1.1.3 (2025-08-27)
- Bugfix: Fixed labels if
None is the reference group.
1.1.2 (2025-08-24)
- Enhancement: Smoothened out telemetry.
1.1.1 (2025-08-23)
- Bugfix: Fixed error that occurs when propensity matching on only one intervention.
1.1.0b (2025-08-20)
- New: If there are multiple interventions for propensity matching, a propensity score will also be calculated for if an admission received any intervention versus no intervention.
1.1.0 (2025-08-20)
- New: Auto-creation of directory structure for each project.
- New:
info.txt now summarizes the number of matched and unmatched patients during propensity matching.
- Change:
custom.processing() now executes after the ICD codes are processed, allowing for more complex logic.
- Bugfix: Fixed intervention recoding when 'None' is the reference group.
1.0.0 (2025-07-10)
- New: Added
reference.is.none parameter which indicates that 'None' will be considered the reference group rather than any intervention.
- New: Added
subgroups parameter to indicate stratifications that will be broken up for separate analysis.
- New: Auto-generate raw hospitalizations, deaths, outcomes in each subgroup and overall.
- New: info.txt with human-readable variable names.
- New: Calculate interaction p-values between subgroups.
- New: If multiple interventions, the first listed one is considered the reference group rather than 'None'.
- New: Telemetry.
- Enhancement: Cleaner forest plots.
- Enhancement: Cleaned the console a little.
- Bugfix: Ensuring useful columns are retained for later.
- Bugfix: Remove singletons from each stratum.
0.4.0b (2025-02-09)
- Change: Figures now output in TIFF format.
- Tiny fixes: Fixed forest plots.
0.4.0 (2025-02-09)
- New: Added forest plots for odds ratios.
- New: Added
& to create more complex conditions in ICD groups.
- New: Added more extensive survey reporting for each outcome.
- New: Supported multiple propensity match interventions.
- New: Added better error reporting.
0.3.2 (2025-02-08)
- Bugfix: Fixed exclusion group processing.
- Bugfix: Fixed regular expression parsing.
0.3.1b (2025-01-26)
- Bugfix: Fixed consequences of fixing categorical intervention variables.
0.3.1 (2025-01-26)
- Bugfix: Fixed categorical intervention variables.
- Bugfix: Fixed Excel 31 character sheet name limit.
0.3.0 (2025-01-19)
- New: Added
add.other parameter which adds an Other column when there are multiple interventions.
- Change: ZIPINC_QRTL is no longer considered an 'ordered' factor.
- Bugfix: Fixed secondary procedural code searching.
- Bugfix: Allowed interventions to be existing Elixhauser comorbidities.
- Bugfix: Fixed singleton variables not being removed from certain parts of the analysis.
- Tiny fixes: Fixed spelling/cosmetic formatting.
0.2.0 (2025-01-14)
- New: Added
match.characteristics.alpha parameter.
- Baseline characteristics with p-values below this threshold are included in propensity matching.
0.1.1 (2025-01-11)
- New: Updated database with ZIPINC_QRTL labels.
0.1.0 (2025-01-01)