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

RE: st: RE: forvalues and scalar: easy question


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: forvalues and scalar: easy question
Date   Thu, 27 May 2004 12:44:56 +0100

I call this class of problems "everybody else" problems. 

I suggest starting with 

How do I create variables summarizing for each individual 
properties of the other members of a group?
http://www.stata.com/support/faqs/data/members.html

Note that means are easy, by virtue of 

sum of the others = sum of all - this value

after which 

mean of the others = sum of the others / (#values - 1)

Some of the other "everybody else" problems are 
a fair bit nastier than that. 

Nick
[email protected] 

[email protected]

With the looping I intend to generate peer-group variables ( means) using a PISA-like dataset ( with info on same school (peers)) for each pupil separately, but the observation (pupil) itself left-out (dropped) since otherwise it would not be a peer-group. In case you are interesetd in helping / willing to help me to find a more efficient way to do that, pls tell me.

*
*   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