I have simple program where I want to generate a variable t that es equal to the second argument. If there is no second argument I want t to be equal to the first argument:
Code:
cap prog drop try
prog try
syntax varlist
gen t = `2'
replace t=`1' if "`2'" == ""
endCode:
try var1 var2
Code:
try var1
I appreciate your help
Magnus
No comments:
Post a Comment