https://www.statalist.org/forums/for...72#post1681572