Fuzzy equality comparison [CRC test suite] ------------------------- ^asserteq^ ^tol^erance { # | ^default^ } ^asserteq^ { ^noi^sily | ^qui^etly } ^asserteq^ ^==^ [^noi^sily|^qui^etly] ^asserteq^ ^/=^ [^noi^sily|^qui^etly] ^asserteq^ ^//^ [^noi^sily|^qui^etly] ^vserteq^ ^==^ Description ----------- ^asserteq tolerance^ sets the tolerance. The tolerance is ^default^ at the beginning of a test or after ^macro drop _all^. ^asserteq^ {^noisily^|^quietly^} sets whether the observed difference is shown. The default is quietly at the beginning of a test or ^macro drop _all^. ^asserteq^ ^==^ asserts | - | < tolerance ^asserteq^ ^/=^ asserts | - | ----------------- < tolerance max( 1, || ) ^asserteq^ ^//^ asserts | - | ----------------- < tolerance || The ^noisily^ and ^quietly^ "options" temporarily override the the ^noisily^ and ^quietly^ settings. ^vserteq^ ^==^ is equivalent to ^asserteq^ ^==^ except that it reports the maximum absolute difference. ^asserteq^ would report the dif- ferences for the first observation. ^vserteq^ is always noisy. There is no reason to use the computationally more expensive ^vserteq^ if you do not want to see the report. Features -------- ^asserteq^ is implemented in terms of ^assert^; therefore, and may be scalar or vector expressions. ^noisily^, however, is useless in the vector case because it prints the the results for the first observation only. Bugs ---- You must put blanks around ^==^, ^/=^, and ^//^. If or contains blanks, you must bind using double quotes. ^vserteq^ sorts the data. It returns the data in the same order, but with the sort markers cleared. (This could be fixed for Stata 3.1.) Also see -------- On-line: ^help^ for ^testproc^