I have some doubts about variable lists.
I need to do three things:
1) get the variables which are in one list but cannot be one of the variables of another list
I tried as below and it worked
2) add two variable lists
I tried as below but stata do not let be add, just subtract
3) work with a variable list in global macro, once I have a variable list which I need all the time in my do file (and local lists just work if I run it together with other commands)
I do not know how to do this.
Thank you very much!
I need to do three things:
1) get the variables which are in one list but cannot be one of the variables of another list
I tried as below and it worked
Code:
use ${ST}/ST_AC.dta, clear quietly describe, varlist local estab `r(varlist)' use ${PF}/PF_AC.dta, clear quietly describe, varlist local vars `r(varlist)' local new : list vars - estab ds `new'
I tried as below but stata do not let be add, just subtract
Code:
use ${PF}/PF_AC.dta, clear quietly describe, varlist local vars `r(varlist)' local chave cnes competen local new : list vars + chave
I do not know how to do this.
Thank you very much!
Comment