
From  Richard Williams <[email protected]> 
To  [email protected] 
Subject  Re: st: Looping through a variable list 
Date  Sat, 25 Feb 2006 00:00:58 0500 
At 11:30 PM 2/24/2006, [email protected] wrote:
Try this:I would like to loop my estimations through an increasing number of variables, but I am having difficulty undating my varlist. For example, suppose there were four variable (A B C D) and I wish to estimate x on y where x is one of the four sets: "A", "A B", "A B C", and "A B C D". tokenize "A B C D" local i = 1 local x = "" while i<=4 { local x = `x'+``i'' regress y `x' local i=`i'+1 }
© Copyright 1996–2024 StataCorp LLC  Terms of use  Privacy  Contact us  What's new  Site index 