Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re:

From   Christopher Baum <>
Subject   st: re:
Date   Wed, 10 Mar 2010 12:53:10 -0500

Leaving aside the missing values, do you have any advice on how to add
additional variables one step at a time from a list of independent
variables using a loop:

sysuse auto,clear
loc myvl mpg weight turn trunk
foreach v of local myvl {
	loc regl "`regl' `v'"
	reg price `regl'

Kit Baum   |   Boston College Economics and DIW Berlin   |
An Introduction to Stata Programming   |
An Introduction to Modern Econometrics Using Stata   |

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index