Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Miguel Angel Duran" <maduran@uma.es> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | RE: st: A new dataset with means by period |
Date | Fri, 12 Apr 2013 14:34:39 +0200 |
Thanks, William. -----Mensaje original----- De: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] En nombre de William Buchanan Enviado el: viernes, 12 de abril de 2013 14:15 Para: statalist@hsphsun2.harvard.edu Asunto: Re: st: A new dataset with means by period Read the help file for collapse. You should be using the -by()- option and not the by: prefix. Sent from my iPhone On Apr 12, 2013, at 5:12, "Miguel Angel Duran" <maduran@uma.es> wrote: > Sorry, Geomina, I meant collapse (not compress), but collapse does not > work with by:. > > -----Mensaje original----- > De: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] En nombre de Geomina > Turlea Enviado el: viernes, 12 de abril de 2013 14:03 > Para: statalist@hsphsun2.harvard.edu > Asunto: Re: st: A new dataset with means by period > > Hi Miguel, > you can do the same thing that you tried by using collapse > > by date: collapse (mean) var > > > _________________________________________Geomina Turlea TODO AQUEL QUE > SUEÑA SE CONVIERTE EN ARTISTA > > > --- On Fri, 4/12/13, Miguel Angel Duran <maduran@uma.es> wrote: > >> From: Miguel Angel Duran <maduran@uma.es> >> Subject: st: A new dataset with means by period >> To: statalist@hsphsun2.harvard.edu >> Date: Friday, April 12, 2013, 2:53 PM From a panel data set, I want >> to generate a new dataset with the means per period. I have tried to >> use 'By date: compress (mean) var', but by: does not seem to work >> with compress. Will you please help me? Is there a way to do this >> automatically? >> >> M. Angel. >> >> -----Mensaje original----- >> De: owner-statalist@hsphsun2.harvard.edu >> [mailto:owner-statalist@hsphsun2.harvard.edu] >> En nombre de Miguel Angel >> Duran >> Enviado el: lunes, 08 de abril de 2013 21:27 >> Para: statalist@hsphsun2.harvard.edu >> Asunto: st: Dropping all subjects but those in the last period >> >> My dataset includes observations for about 9000 companies per year in >> a twenty years period. To clean the dataset, I would like to drop all >> those companies that are not present in the last year (because the >> rest went bankrupt or were absorbed), but I do not know how to do it. >> Can this be done >> just by splitting the datasets by period and then merging them? Each >> company has the same id across years. Thanks. >> >> Miguel A. Duran. >> >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/