Statalist


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

Re: st: OLS regression in STATA - missings


From   "Friedrich Huebler" <fhuebler@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: OLS regression in STATA - missings
Date   Sun, 5 Oct 2008 08:41:28 -0400

Bastian,

See -help levelsof-.

levelsof Observation_Year, local(years)
foreach y of local years {
reg dependent_var indep_var1 indep_var2  if Observation_Year <= `y',
robust cluster (firms)
}

Friedrich

On Sun, Oct 5, 2008 at 8:16 AM,  <Steingros@gmx.de> wrote:
> Dear Stata users ,
>
> I am using this command to run a OLS regression:
>
> forvalues i=1977/2007 {
> reg dependent_var indep_var1 indep_var2  if Observation_Year <= `i', robust cluster (firms)
> }
>
> However, STATA displays in this case "no observations" and  it is not possible to run the regression.
>
> For instance, in 1980, I have observations of the second independent variable and the dependent variable  only, but I thought that STATA would ignore this year and continue the regression in 1981 instead. Obviously, it is not the case!
>
> So what should I do about this problem ? Any ideas???
>
> Thank you very much !
>
> Bastian S
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
> *
> *   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/
>

*
*   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/



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