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

st: Re: how to regress and outreg by year?

From   Kit Baum <>
Subject   st: Re: how to regress and outreg by year?
Date   Thu, 15 May 2008 08:49:18 -0400

Suggest you use estout:

webuse grunfeld,clear
keep if year < 1940
levelsof year, local(yrs)
eststo clear
foreach y of local yrs {
eststo: qui reg invest mvalue kstock if year == `y'

You could readily modify this to handle more years (for instance, keeping track of the count, and writing a table every five years, then clearing stored estimates).

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

On May 15, 2008, at 02:33 , statalist-digest wrote:

May I ask a novice question? I'm really new to Stata. I want to run regression by year and the outreg the coefficients for each year. I want to use like :
by year: xi: areg score age education , absorb(nation), but stata tells me "by" can not be combined with xi. Anyone has good solutions? Also I don't think using by can outreg coefficients for each year.
*   For searches and help try:

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