Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: upper case to lower case for all variable names


From   Caleb Southworth <caleb@twinky.uoregon.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: upper case to lower case for all variable names
Date   Wed, 16 Nov 2005 10:23:24 -0800 (PST)

Mindy: I am guessing that you are asking (1) how to run a regression with
lagged variables and (2) how to save the predicted values. You might
describe the SIC code; if you are using the four-digit code, implying
thousands of regressions, then you will need to use a loop. On the other
hand, if there are only a few industry differences that matter, then you
could use predict after your regressions.

Within SIC lags:
sort SIC
by SIC: gen CF_1=CF[_n-1]
by SIC: gen CF_2=CF[_n-2]
etc.

Residuals:
reg WC_1 CF_1 CF_2 CF if SIC==1
predict r_sic1, resid
etc.

estimates may also be useful to you see
man estimates

On Wed, 16 Nov 2005, Mindell Nitkin wrote:

:I am running a series of regressions on industry specific data,for example
:sort SIC
:by SIC: regress WCj,t-1 CFj,t-2 CFj,t-1 CFj, t
:
:The resulting coefficencts from the lagged industry regressions, need to
:be applied to current year values for each firm in the industry in order
:to predict the level of WCj,t and to calculate the residual which will
:be used in as an earnings quality metric in other regressions.

Caleb
caleb@uoregon.edu
University of Oregon Sociology
*
*   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