Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: AW: How to filter data


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: How to filter data
Date   Tue, 15 Jun 2010 12:44:45 +0200

<> 


1. How do i sum up all the sales of several companies per year or quarter. Do i have do to that in a new dataset?


-bys year/quarter: egen totalsales=total(sales)-

See NJC`s http://www.stata-journal.com/sjpdf.html?articlenum=pr0004



2. I gernerated a new variable that marks when a company grew in the last quarter more than 50% with a 1. now i want to delete all observations of that company in the dataset in order to limit biases of M&As. I have different number ob observations per company( quartely reporting)



-drop if newvariablename==1-


It may be better to condition via -if- than to -drop- outright, though...

HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Thomas Gericks
Gesendet: Dienstag, 15. Juni 2010 12:26
An: statalist@hsphsun2.harvard.edu
Betreff: st: How to filter data

Hello,

I am analyzing a paneldataset.
I have two questions:

1. How do i sum up all the sales of several companies per year or quarter. Do i have do to that in a new dataset?

2. I gernerated a new variable that marks when a company grew in the last quarter more than 50% with a 1. now i want to delete all observations of that company in the dataset in order to limit biases of M&As. I have different number ob observations per company( quartely reporting)


As I have no programming background I'm overstrained with the syntax.

Thank you very much for your help

Best regards,
Thomas Gericks
___________________________________________________________
WEB.DE DSL ab 19,99 Euro/Monat. Bis zu 150,- Euro Startguthaben und
50,- Euro Geldprämie inklusive! https://freundschaftswerbung.web.de

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index