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

Re: st: cross-sectional (retarded) averages

From   "Austin Nichols" <>
Subject   Re: st: cross-sectional (retarded) averages
Date   Fri, 19 Oct 2007 13:23:54 -0400

Daniele Gori <>:
It's not really clear to me what you want from the question.  Try
framing it in terms of a small dataset we can see, and results that
can be read easily in an email.  Is this in the right vein?

webuse grunfeld, clear
loc tv "`r(timevar)'"
levelsof `tv', loc(tl)
foreach v in pred cons curi lagi {
 g double `v'=.
foreach t of local tl {
 cap reg mval inv l.inv if `tv'==`t'
 qui if _rc==0 {
  tempvar pt
  predict double `pt'
  replace pred=`pt' if e(sample)
  replace cons=_b[_cons] if e(sample)
  replace curi=_b[inv] if e(sample)
  replace lagi=_b[L1.] if e(sample)
  drop `pt'

On 10/18/07, Daniele Gori <> wrote:
> Dear all,
> I have a large (but incomplete) panel database of firm level data and many variable, from 1995 to 2005. I would like to adopt the cross-section average estimation technique. My goal is to compute time-varying predicted values of the dependent variable. In particular, in my case I wish to estimate the following equation:
> yi = x1i + x2i + ui  (1)
*   For searches and help try:

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