I would like to generate a new variable and fill the new variable with the valid values from a list of variables named as exceeds_TLE_*. In fact, all the valid values in the exceeds_TLE_* have a diagonal form and can be combined in a single variable. Below please see what I tried.
Thanks.
Nader
local `TLE_exceed' exceeds_TLE_*
gen TLE_combined=.
replace TLE_combined=`TLE_exceed' if `TLE_exceed'~=. & TLE_combined==.
gen TLE_combined=.
replace TLE_combined=`TLE_exceed' if `TLE_exceed'~=. & TLE_combined==.
0 Response to replacing values of a new variable with valid values of other variables
Post a Comment