DemoTools icon indicating copy to clipboard operation
DemoTools copied to clipboard

unit tests for agesmth

Open timriffe opened this issue 6 years ago • 2 comments

  1. 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.)
  2. some methods are supposed to imply constrained totals in larger age groups.
  3. negative counts should be impossible (all methods)
  4. the data can never get 'rougher' (all methods)

timriffe avatar Dec 26 '18 10:12 timriffe

@timriffe how would you define roughness in this test?

ikashnitsky avatar Apr 06 '19 21:04 ikashnitsky

@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.

timriffe avatar Oct 27 '19 11:10 timriffe