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: concentration indices and SEs (Was: Postlist for bootstrap)


From   <[email protected]>
To   <[email protected]>
Subject   st: concentration indices and SEs (Was: Postlist for bootstrap)
Date   Tue, 4 Jun 2013 10:12:19 +0100

------------------------------

Date: Mon, 3 Jun 2013 17:26:14 +0200
From: Vincenzo Carrieri <[email protected]>
Subject: st: Postlist for bootstrap

Dear Statalisters,
I am trying to implement bootstrap estimations of standard errors for
concentration indexes but I get an error like: the variable "sesso"
(name of the first variable that I use in the regression) was not
found. I think that the problem is mostly on the use of postfile but I
cannot find the solution.

Here an example of what I did using just few variables.

I first using data:

use "C:\Users\User\Desktop\TEST.dta", replace

Then I Declare variable names and filename of dataset where results
will be stored

postfile test2 my ciy m01 b01 ci01 using
"C:\Users\User\Desktop\TEST.DTA",replace

Then I launch my programme

capture program drop index
program define index
regress sesso eta
predict sesso
sum sesso
scalar my = r(mean)
sum eta
scalar m01=r(mean)

tempname my ciy m01 b01  ci01
sca b01 = _b[eta]
gen rank=reddito

I compute  concentration indices
  corr rank sesso        , c
     sca ciy           = 2*r(cov_12)/my
  corr rank eta        , c
     sca ci01           = 2*r(cov_12)/m01

post stak my ciy m01 b01 ci01

end

Up to now everything is ok.


Finally I do boostrap:

bootstrap , reps(10) : index

Here I get the error message: variable sesso not found an error
occurred when bootstrap executed index


My code  would continue:

I close the postfile

postclose test2

use "C:\Users\User\Desktop\test.dta", replace

sum my ciy m01 b01 ci01


Anyone can help me to understand what is wrong in my bootstrap
programming?

Any help is appreciated.
Thanks,

Vincenzo
==================

Not the answer to your question, but ...

... For calculation of concentration indices and bootstrapping, I
recommend the -sgini- package by Philippe Van Kerm.

Look at http://medim.ceps.lu/?id=software , which has the program
(downloadable) plus good documentation

Install the package from within Stata by typing:
    net describe sgini , from(http://medim.ceps.lu/stata) 

Manual:   http://medim.ceps.lu/stata/sgini.pdf


Stephen
------------------
Stephen P. Jenkins <[email protected]>
Professor of Economic and Social Policy
Department of Social Policy 
London School of Economics and Political Science
Houghton Street, London WC2A 2AE, UK
Tel: +44(0)20 7955 6527
The Great Recession and the Distribution of Household Incomes, OUP 2013,
http://ukcatalogue.oup.com/product/9780199671021.do
Changing Fortunes: Income Mobility and Poverty Dynamics in Britain, OUP
2011, http://ukcatalogue.oup.com/product/9780199226436.do
Survival Analysis Using Stata:
http://www.iser.essex.ac.uk/survival-analysis
Downloadable papers and software: http://ideas.repec.org/e/pje7.html

Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

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