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]

st: A Data Management Question


From   Anup Nandialath <[email protected]>
To   [email protected]
Subject   st: A Data Management Question
Date   Sat, 13 Jul 2013 08:47:19 +0400

Hello Statalisters,

I'm trying to generate some descriptive information from a large panel
data set. Here is my specific problem

I'm trying to examine the bank lending relationships across large
sample. For this one of my tasks is to check the market share of each
bank(bankname) for each industry (nicgroup) in my sample. Since I have
panel data, I want to check this on a year on year basis. Thanks to
statalist i found some code that I could reuse to achieve the same.

egen double lendshare=sum(totalbanklending), by (bankname nicgroup Year)
egen double totshare=sum(totalbanklending), by (nicgroup Year)
gen marketshare=lendshare/totshare

Next I created a dummy variable "specialist" to check if a particular
bank specializes in lending in one particular industry. However, this
results in a dummy variable for the particular bank which has the
maximum market share in the relevant industry. While this is fine,
what I would like to do is the following

Create a dummy variable which takes the value of 1 for "ALL FIRMS"
that fall within that particular nicgroup where a specialist banker
has been detected. Specifically I want to be able to subset the
industries/firms where there are no specialist bankers.

Any help in this respect is very much appreciated!!

Thanks
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index