Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: a little bit of Stata programming....


From   "Nirina F" <fstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: a little bit of Stata programming....
Date   Wed, 19 Sep 2007 11:51:38 -0400

Hello all,

I have read Kit's paper but still not familiar with programming.

I have:

global  x "x1 until x8"
global y "y1 until y15"
global z "z1 until z3"
global w "w1 until w24"
global k "k1 until k9"

local xvars "$x $y $z $w $k"
local out "x1 y1 z1 w1 k1 x7 y13 z3 k4 w20"

I would like to do

foreach i in out {
reg `i' `xvars'
}

but now I would have depedent variable collinear with one of control
variable. So how could I run the reg but telling my controls `xvars'
to not include what is taken by `i' ?

Thank you so much in advance for your help

Nirina
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index