DemoTools
DemoTools copied to clipboard
unit tests for agesmth
- total population shouldn't change before/after (all methods, but not sure how this interacts with different tail options. For some methods only middle age range modified.)
- some methods are supposed to imply constrained totals in larger age groups.
- negative counts should be impossible (all methods)
- the data can never get 'rougher' (all methods)
@timriffe how would you define roughness in this test?
@ikashnitsky sum(abs(diff(Value)))
should be smaller after agesmth()
than before. I actually don't know whether this is guaranteed for all of the methods, but it's the spirit of agesmth()
anyway.