Consider the following example code.
According to this code, the return of the command xtset looks like a "local" macro.
However, I found a confusing thing, let's see the results below.
Here, only the st_global mata code returns a result.
So is r(panelvar) local or global?
Code:
. quietly webuse nlswork, clear . quietly xtset idcode year . display "`r(panelvar)'" idcode . display "$r(panelvar)" (panelvar)
However, I found a confusing thing, let's see the results below.
Code:
. mata: st_local("r(panelvar)") . mata: st_global("r(panelvar)") idcode
So is r(panelvar) local or global?
Comment