Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: sum question


From   Patricia Vera Rojas <[email protected]>
To   [email protected]
Subject   RE: st: sum question
Date   Tue, 13 Jun 2006 17:13:10 +0200 (CEST)

But I have many observations for each id, 
I can not sum it manually...

Patricia


 --- "White, Justin" <[email protected]> escribi�:

> Did you try a replace command?
> 
> You could say:
> 
> Replace income = 40 if id==x
> Replace income = 45 if id==xx
> 
> That is probably the easiest thing to do.
> 
> Justin 
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf
> Of Patricia Vera Rojas
> Sent: Tuesday, June 13, 2006 11:02 AM
> To: [email protected]
> Subject: st: sum question
> 
> Hi everyone,
> 
> I have:
> 
> ID  Income
> x     15
> x     20
> x      5
> xx     15
> xx     10
> xx     10
> xx     10
> 
> I want to get:
> 
> ID  Tot-Inc
> x     40
> x     40
> x     40
> xx    45
> xx    45
> xx    45
> xx    45
> 
> 
> How can I do it?
> 
> Thanks a lot,
> 
> Patricia
> 
>  
> > I have a recursive problem involving linked list of
> > structures in Mata, but 
> > after some number of chains (number is not fixed,
> that's
> > why I decided to 
> > use list instead of a matrix) I don't need an earlier
> > members of the list 
> > and they can be dropped to free some memory. If I don't
> > drop them, my list 
> > is getting too long and even makes Stata to crash.
> > 
> > I was wondering if there was some way of clearing
> > structures like other 
> > objects in Stata.
> > 
> > Thanks in advance,
> > Zurab
> > 
> > 
> > *
> > *   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/
> > 
> 
> 
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam
> �gratis! 
> Reg�strate ya - http://correo.yahoo.es 
> *
> *   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/
> 
> 
> *
> *   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/
> 


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam �gratis! 
Reg�strate ya - http://correo.yahoo.es 
*
*   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