Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Programming a slightly complex list of independent variables
From
Christopher Baum <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Programming a slightly complex list of independent variables
Date
Wed, 6 Apr 2011 06:56:58 -0400
<>
Use something like this to generate a list of all s* and f* which may then be pruned appropriately to remove x and z:
webuse lutkepohl, clear
unab allell: l*
di "`allell'"
forv i=1/3 {
loc zap: word `i' of `allell'
loc list`i': list allell - zap
di "`list`i''"
}
Kit
On Apr 6, 2011, at 2:33 AM, Nic wrote:
> So my ultimate question is: how can I program my regression command so that
> the s* and f* variables at the end of the command refer to all "s" and "f"
> variables EXCEPT for the two specific "s" and "f" (`x' and `z') variables
> referenced at the beginning of the equation? Logic tells me that this is
> surely possible but I am still so new to Stata and programming in particular
> that I simply have not been able to suss it out.
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/