He is creating a non-temp-var UBAR when he means to create a tempvar
UBAR. Seems like the same problem arises for any of these tempvars in
his code.
Unlike local foo = whatever, in which foo is not "tiicked" when it
appears on the LHS, once something is a tempvar or a tempname, any ref
to it should be via the "ticked" form `foo'.
. sysuse auto
(1978 Automobile Data)
. tempvar junk
. g junk = price/mpg
. su `junk'
variable __000000 not found
r(111);
. g `junk' = price^2
. su `junk'
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
__000000 | 74 4.66e+07 5.14e+07 1.08e+07 2.53e+08