Page 1 of 1
Herfindahl-Hirschman index calculation in Eviews
Posted: Wed Apr 02, 2014 3:06 pm
by emelia67
I was wondering if Eviews could calculate HHI across 30 banking jurisdictions containing 267 banks over a 12 year period using the total assets of the respective banks as their market shares. If it could be done how do I proceed.
Many thanks.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Thu Apr 03, 2014 1:27 am
by trubador
You can easily calculate HH index in EViews:
Code: Select all
'Example taken from
'http://en.wikipedia.org/wiki/Herfindahl_index
'Create a workfile
wfcreate u 16
'Create the series to hold shares
series shares
'Assume that 10% of output is divided among 10 equally sized producers
smpl 7 @last
shares = 0.01
'Case 1: All six firms produce 15% each
smpl 1 6
shares = 0.15
smpl @all
scalar Hindex1 = @sumsq(shares)
'Case 2: One firm produces 80% while the five others produce 2% each
smpl 1 1
shares = 0.80
smpl 2 6
shares = 0.02
smpl @all
scalar Hindex2 = @sumsq(shares)
'Ideal case: Each firm would have a share of 1/N
scalar Hindex = 16*(1/16)^2
In your case, however, you may need to structure your data as Panel. Following example will give you the idea:
Code: Select all
'Create a panel workfile
!first = 2002
!last = 2013
!banks = 267
wfcreate(wf=banks, page=data) a !first !last !banks
'Your series would have the actual values
series shares = 1/!banks
'Create a table to summarize results
table(13,2) Hindex
Hindex(1,1) = "Years"
Hindex(1,2) = "HH_index"
!nperiods = !last-!first+1
'Compute the index for each year
for !i = 1 to !nperiods
smpl !first+!i-1 !first+!i-1
Hindex(!i+1,1) = @str(!first+!i-1)
Hindex(!i+1,2) = @sumsq(shares)
next
smpl @all
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Thu Apr 03, 2014 6:20 am
by emelia67
Many thanks, but I find it a bit difficult to get my head round it. Are the two boxes alternative methods to do it? Would be glad if you could come a bit clearer. Again for your information my data set is panel.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Thu Apr 03, 2014 6:42 am
by trubador
You can work on the second code.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Thu Apr 03, 2014 4:08 pm
by emelia67
Fine, I'll use the second code. But could you walk me through the procedure step by step, please. As it is I cannot make any sense of the numbers, the exclamation signs, etc, etc. Would be glad if you could tell me what each means. The attached is the data set in question - the series (column) BSIZE is the total assets per bank in a country per year which I use as a proxy for the market share which I calculate as its ratio to the total assets for all the banks in a country multiplied by 100.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Fri Apr 04, 2014 12:12 am
by trubador
EViews has very nice pedagogical learning resources. See, for instance, Help-->EViews Illustrated. You can then have a look at the manuals and search the forum if you need further help.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Fri Apr 04, 2014 1:49 am
by emelia67
I wonder if that manual specifically talks about the calculation of HHI. If it does and I have not sighted it could you please for example sign-post it to me, for example the precise page where I can have help.
Thanks.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Fri Apr 04, 2014 2:31 am
by trubador
Of course not. Those sources will guide you through the steps necessary for understanding and using the software for such custom needs.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Mon Apr 07, 2014 7:59 am
by emelia67
In order not to waste time raking through the pages could you please point me to the pages for such custom needs.
Thanks
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Mon Apr 07, 2014 10:22 am
by EViews Gareth
Page 415 of EViews Illustrated PDF.
Page 689 of EViews 8 Command Reference PDF.
Page 887 of EViews 8 Object Reference PDF.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Mon Apr 07, 2014 10:35 am
by emelia67
Many thanks, Gareth for your kindness!
Re: Eviews regression output Warning
Posted: Tue Apr 08, 2014 3:52 am
by emelia67
In a panel estimation using white cross section as a coefficient covariance method for robust SEs what does Eviews mean when it warns thus: WARNING: estimated coefficient covariance matrix is of reduced rank .
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Tue Apr 08, 2014 8:36 am
by EViews Glenn
That your coefficient covariance matrix is singular.
One possibility is that you have fewer periods than the number of coefficients.
Re: Herfindahl-Hirschman index calculation in Eviews
Posted: Tue Apr 08, 2014 2:44 pm
by emelia67
Ok Glenn, either way does that then mean the regression results aren't reliable? And if so what could be the best solution?