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]
Re: st: replacing with mean
From
Fabio Zona <[email protected]>
To
[email protected]
Subject
Re: st: replacing with mean
Date
Thu, 2 Dec 2010 19:56:01 +0100 (CET)
Thanks a lot to both Dimitry and Nick.
Last issue: I have read the FAQ. However, it is just for one variable: how should I implement the commands when I have 20 or more different variables? I am facing difficulties in writing the lines!!
Thanks!
F
----- Messaggio originale -----
Da: "Nick Cox" <[email protected]>
A: "[email protected]" <[email protected]>
Inviato: Giovedì, 2 dicembre 2010 18:43:42 GMT +01:00 Amsterdam/Berlino/Berna/Roma/Stoccolma/Vienna
Oggetto: RE: st: replacing with mean
This is an FAQ.
FAQ . . Creating variables recording prop. of the other members of a group
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
4/05 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
Nick
[email protected]
Fabio Zona
my request for "replace missing" was related to a more complex procedure I am trying to define. I think I better describe the whole problem and ask you for a more general and maybe effective solution.
Here is the problem.
Say I have 200 industries. I have a list of companies, List"A", of say 5000 companies distributed among these industries. For each of these companies I have 20 variables.
Companies
Industry List"A" Var1 Var2 Var3
A 1
A 2
A 3
..
B
..
I have a separate list, List"B" of 700 companies, that is a subsample of List"A".
I need to associate to each company "i" of List"B" (my sample for regression) the median value of its industry EXCLUDING the focal company "i", and have to do this for all 20 variables!
It's extremely challenging. How would you deal with this?
*
* 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/