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

st: Intra list max / rank


From   Robert Peska <[email protected]>
To   [email protected]
Subject   st: Intra list max / rank
Date   Sat, 19 Nov 2005 09:55:32 +0100

Hi!

I'm new to this list, so please be patient if my question isn't the way it 
should be. 

following problem:

I have data like:
id	bid	time
1	1	1
1	3	3
1	4	2
1	8	4
1	10	5
1	12	6
1	14	8
1	17	7
2	5	1
2	6	2
2	9	3

And I want to calculate things like max, mean or rank:
*) by id
*) stepwise inside the id's

That means f.e if in line 3 of id x I want to create an value that expresses 
max(bid[1] bid[2] bid[3]).

So generally speaking a stepwise func(bid[1] ...bid[n]) foreach single n, by 
id.

As far as I have seen the sw command is only usable by regression commands.

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