Skip to content

Rescaling weights with absent levels #1

@mattkumar

Description

@mattkumar

Currently, if there are missing combinations of standardization variable levels in the sample data relative to the reference/population data, the weights are not scaled correctly. This is due to the left_join function in the various functions in the package.

E.g. age standardized rates
Ref Data: 5 distinct age bands with population sizes
Sample Data: 4 of the 5 age bands are present, 1 age band wasn't observed.

Rates are being calculated by rescaling the ref data to just the 4 levels that are present in the sample data which is incorrect.

To be safe, check that your sample data has all the levels of the standardization variables present in the ref data. Fix is being worked on.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions