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

st: RE:

From   "Scott Merryman" <>
To   <>
Subject   st: RE:
Date   Thu, 10 Jun 2004 10:10:47 -0500

In addition to the lag operator, Stata has a difference operator that
understands panel data (see -whelp varlist- for more info). 

One way to construct your variables would be with a -foreach- loop.

foreach var of varlist x_1 - x_n {
	gen `var'_fd = d.`var'


-----Original Message-----
[] On Behalf Of david reinstein
Sent: Tuesday, June 08, 2004 5:00 PM

Does Stata  have a built in command or module to implement the
first-difference (FD) estimator, 'the pooled OLS estimate from the
regression Delta(y_it) on Delta(x_it), t=2,...,T; i=1,2,...N "
(Wooldridge, 2002, p 280)

I imagine I could do this manually but there may be some modifications and
adjustments necessary to regression statistics.
If I have to do it manually, what is the easiest way to form the
first-differenced variables?  Do I use the indexing [_n], [_n-1], etc?

Need a new email address that people can remember
Check out the new EudoraMail at
*   For searches and help try:

*   For searches and help try:

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