hi,
suppose i have a variables named x1 x2 x3 ....x2000 and had set the following local macro and forv loop (that obviously didnt work):
local j 365
forv i=366(365)2557{
use x(`i'-`j') using abcd.dta
}
is it possible to specify the above -use- command by "subracting" macros to specify an x variable ? i tried a few formats but none worked.
i m doing this to ultimately spit a data set "horizontally"
thx
Related Posts with macros in variable names
renaming variables using values they holdHey everyone, Is there a simple command (or few lines of code) to rename variables based on a speci…
Taking the average of observations within a specific date rangeHi, I want to compute the average of a variable (teamsize) for observations within a specific time …
Problems creating Herfindahl-Hirschman IndexHello everyone, I want to create the Herfindahl-Hirschman Index for my data. I have quartlery data …
How to display the P value of the mediation with khb command?Hi all, Recently I read a paper published in JAMA Pediatrics(doi:10.1001/jamapediatrics.2019.1212),…
Code of Patell Z-statisticGoodmorning everyone, I'd like to derive a Z-statistic by means of the Patell test (https://www.eve…
Subscribe to:
Post Comments (Atom)
0 Response to macros in variable names
Post a Comment