idblr / ndi

Computes various geospatial indices of socioeconomic deprivation and disparity in the United States
Apache License 2.0
21 stars 1 forks source link

Significant Digits #3

Closed chris-prener closed 2 years ago

chris-prener commented 2 years ago

One additional question that popped up in messer() is the rounding that takes place at the end. I'm sure you had a reason for doing it! Just curious your thoughts about whether that should be optional?

idblr commented 2 years ago

@chris-prener, I agree the rounding should be optional. Rounding the raw census data was implemented in the initial releases to match the output of the data provided by the NHLBI ADOPT Core Measures, see Socioeconomic Deprivation to replicate their approach with the powell_wiley() function.

I believe not rounding in future releases is the better approach; users can round after the calculation. Or would you prefer an additional argument?

chris-prener commented 2 years ago

Especially if you're replicating prior work, it makes sense to provide something that gets you as close as possible to the original estimates. I might suggest an argument with a logical scalar - something like round_output where TRUE allows you to match prior work and FALSE returns data without rounding?

idblr commented 2 years ago

Great idea, @chris-prener. I've opened a new dev_round_output branch and commit to add the suggested round_output argument to the functions. The default is FALSE, no rounding.

The branch passes CRAN checks, but feedback about the new round_output argument, structure, and documentation is welcomed.

chris-prener commented 2 years ago

makes sense to me @idblr!