Statalist


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

st: RE: regression: fade rate residual income


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: regression: fade rate residual income
Date   Mon, 20 Oct 2008 13:37:03 +0100

I think you have problems at various levels. 

The most obvious is that -rollreg- from SSC [please remember to explain
where user-written programs you discuss come from] does not support data
with gaps. When you -tsset- your data you should have seen a comment
that your data include gaps. 

The next is what you are trying to do. If I read this correctly, you
want to look at regressions for pairs of values within each panel. That
gives you at most two distinct data points and you should be able to
solve for the coefficients directly. You will get perfect fits, except
when points coincide when regression will be indeterminate. Also, there
is no question of an error term. 

On the other hand, I doubt that I am reading you correctly. 

You posted on this topic a week ago. In response both Michael Hanson and
I hinted that you may need to explain what you expect in more detail to
get better answers. 

Nick 
n.j.cox@durham.ac.uk 

GBrenner1@gmx.de

I would like to run a regression on residual_income. I have yearly
observations of residual income for firms. The year is given in variable
"year", the identifier for firm is "name".

I'd like to run the regression residual_income(year) = b0 + b1 *
residual_income(year-1) + e The regression should run on
"residual_income" over every two consecutive years ("year") within each
identifier "name" (whenever there are values for at least two
consecutive years for a given name).

I used the following:

drop if missing(residual_income)
tsset name year
rollreg residual_income l.residual_income, move(2) stub(a)

I hope this command will do what I want but unfortunately Stata always
says:
sample may not contain gaps
r(198);

What might be the problem? 

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