I am trying to use the 'tempvar' command so that I do not have to drop
variables at the end. However, I am having problems using this within loops.
Are 'tempvar' and 'tempname' not supposed to be used within loops? The part
of my programme that is giving trouble is as follows:
Any insights will be gratefully appreciated.
tempvar y`x'iqq y`xless1'iqq;
if `j'~=`depmax' { ;
capture drop `y`x'iqq' ;
if _rc == 0 { local dropvar="`dropvar' `y`x'iqq`" } ;
ge `y`x'iqq' = 0 `if' ;
replace `y`x'iqq'=( `phiwj' ) / ( `PHIwj' - `PHIwj_1' ) if `1'==`j' &
`ifexp' ;
} ;
if `x'~=2 { ;
replace `y`xless1'iqq'=( -1 * `phiwj_1' ) / ( `PHIwj' - `PHIwj_1' )
if `1'==`j' & `ifexp' ;
} ;
su `1' if `1'>`j' & `ifexp' ;
local j = r(min) ; /* replace j with next value of dep var */
local x=`x'+1 ;
drop `wj_1' `phiwj_1' `PHIwj_1' ;
} ;
#delimit cr
_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail.
http://www.hotmail.com