Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: xt unit-exclusive means by year


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: xt unit-exclusive means by year
Date   Thu, 29 Jul 2010 19:52:36 +0200

<>

Maybe try this FAQ http://www.stata.com/support/faqs/data/members.html by
NJC.


HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jim Mahon
Sent: Donnerstag, 29. Juli 2010 19:48
To: [email protected]
Subject: st: xt unit-exclusive means by year

Dear statalist,

I'm trying to create an instrument in cross-sectional time series that takes

an initial value for each unit and then applies to it the mean trend for all

units but the one in question, and then repeats this operation for each

unit.  Sounds simple, but I can't figure out how to do it:  "by country:

egen instrument = mean(varname) if id ~= x" obviously doesn't work.
Interaction

expansion seems not to be the route.  Do I have to program something? I'd

love not to have to create a new variable for each unit.



Thanks and best wishes,

Jim Mahon

-- 
James E. Mahon, Jr.
Woodrow Wilson Professor and Chair
Department of Political Science
Williams College
226 Schapiro Hall
24 Hopkins Hall Drive
Williamstown, MA 01267
(413) 597-2236

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index