Statalist The Stata Listserver


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

Re: st: manual demeaning of panel data


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: manual demeaning of panel data
Date   Sat, 4 Feb 2006 01:29:48 -0000 (GMT)

Scott Cunningham wrote:

> I want to manually demean my data to use in a separate fixed effects
> regression model.  If "id" marks each individual, and "year" marks
> each year of data, how can I manually demean this data (ie subtract
> the mean [across years[ of each variable marked by "id")?

Downloading Ben Jann's excellent -center- from SSC and then performing
something like

. bysort id (year) : center x1 x2 x3 xetc

should do the trick, although you may want to alter the above example to
taste.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index