Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: replenish panel data


From   "Fabian Schönenberger" <[email protected]>
To   [email protected]
Subject   Re: st: replenish panel data
Date   Mon, 30 Apr 2012 18:23:31 +0200

Many thanks for the quick reply. I used the following formula:
merge 1:1 CUSIP fyear using "file inventory", keep(master match)

In the "file inventory" also CUSIP and fyear define each point-in-time.

However, matching was incorrect and not complete. Incorrect because the transferred data do not match (CUSIP and fyear) with the data in the "file inventory", in other words, the wrong inventory was assigned to the false CUSIP and fyear pair. 

Any suggestions what I am doing wrong?

Thanks in advance, Fabian 


-------- Original-Nachricht --------
> Datum: Mon, 30 Apr 2012 16:04:33 +0200
> Von: Maarten Buis <[email protected]>
> An: [email protected]
> Betreff: Re: st: replenish panel data

> On Mon, Apr 30, 2012 at 3:32 PM, "Fabian Schönenberger" wrote:
> > I am facing to following problem. I have a panel data with ID=CUSIP and
> t=fyear and many other variables like sales, ebits etc.. I have to
> replenish the original data set with a new variable (inventory). Therefore I need
> the command to add the inventory for the equivalent CUSIP at the equivalent
> point-in-time. I have tried merge. But with merge also the unmatched data
> points are added to the origianl data set. With append I cannot specify ID
> and fyear.
> 
> -merge- sounds like the correct command. You need to look at the
> variable _merge to determine which observations you want to keep.
> Alternatively you can specify the -keep()- option. Personally, I
> prefer to do the merging and dropping of redundant observations in two
> separate steps.
> 
> -append- sounds wrong because this only adds new observations to your
> data, while you want to add a variable to existing observations.
> 
> Hope this helps,
> Maarten
> 
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
> 
> 
> http://www.maartenbuis.nl
> --------------------------
> 
> *
> *   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/
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index