Statalist


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

Re: st: Re: Fill in panel observations


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   Re: st: Re: Fill in panel observations
Date   Sat, 28 Mar 2009 22:03:38 +0100

<>

You are welcome. The standard reference for these tricks is Nick`s http://www.stata-journal.com/sjpdf.html?articlenum=pr0004


HTH
Martin
_______________________
----- Original Message ----- From: "John Antonakis" <[email protected]>
To: <[email protected]>
Sent: Saturday, March 28, 2009 10:00 PM
Subject: Re: st: Re: Fill in panel observations


Thanks Martin. That's perfect.

Best,
John.

On 28.03.2009 21:49, Martin Weiss wrote:
<>

*****
bys iis: g rater=_n
bys iis: egen total_rater=count(rater)
*****


HTH
Martin _______________________
----- Original Message ----- From: "John Antonakis" <[email protected]>
To: <[email protected]>
Sent: Saturday, March 28, 2009 9:43 PM
Subject: st: Fill in panel observations


I have multiple observations on leaders (iis) by raters, like this:

iis  sex  age   y  rater   total_rater
1    0    43    5    1        5
1    0    43    9    2        5
1    0    43    3    3        5
1    0    43    6    4        5
1    0    43    6    5        5
2    1    46    9    1        7
2    1    46    7    2        7
2    1    46    9    3        7
2    1    46    6    4        7
2    1    46    7    5        7
2    1    46    2    6        7
2    1    46    8    7        7

At this time, the rater column and total_rater columns are blank. I would like to fill them in such that:

a. Under "Rater" I number each within the panel, starting with 1 and going up to k raters (as I have done above). b. The total number of k raters is included for each leader (as in the total_rater column).

Is there a quick way to do this?

Thanks,
John.
____________________________________________________

Prof. John Antonakis
Associate Dean
Faculty of Business and Economics
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny
Switzerland

Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305

e-mail: [email protected]

____________________________________________________




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