Statalist


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

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


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

I tried to see but still couldn't figure out.
so you mean there is an option command for me to tell xvars to not include i ?
Thanks

On 9/19/07, Austin Nichols <austinnichols@gmail.com> wrote:
> Nirina F <fstata@gmail.com>:
> see -help macrolists- (linked from -help extended_fcn- which is linked
> from -help macro-).
>
> On 9/19/07, Nirina F <fstata@gmail.com> wrote:
> > 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/
> >
> *
> *   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/
>
*
*   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