Hi all,
Is there a way in which I can keep a local available permanently so that I can hold a varlist in it and use it whenever I am running sections of a do file?
What I would like to do is define a local that contains a group of conditioning variables:
And then use it in a set of procedures related to a quasi-experiment (treatvar being the treatment) that I would like to run ad hoc by highlighting the section of do file I want to run, e.g.:
I would prefer to have the local definition once at the top of my do file, run it once, and `myvars' be available whenever I then run a model. Is this possible?
Regards,
Will
Is there a way in which I can keep a local available permanently so that I can hold a varlist in it and use it whenever I am running sections of a do file?
What I would like to do is define a local that contains a group of conditioning variables:
Code:
local myvars "var1 var2 var3 ... var28 var29 var30"
Code:
psmatch2 treatvar, mahal(`myvars') neighbor(2) pscore(ps1) ebalance treatvar `myvars', gen(ebwt) targets(2) tabstat `myvars', by(treatvar) stat(sum n var mean) longstub save
I would prefer to have the local definition once at the top of my do file, run it once, and `myvars' be available whenever I then run a model. Is this possible?
Regards,
Will
Comment