[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: different result everytime - something strange

From   "Nick Cox" <>
To   <>
Subject   st: RE: different result everytime - something strange
Date   Thu, 19 Jun 2008 18:10:46 +0100

The most common explanation is that something is changing the sort order
of your data. 

I'd check to see whether it is -glcurve-. 

Is this _all_ of what you are doing? 


Shehzad Ali

I have encountered a funny problem, which maybe due to something wrong
my codes or with stata. I am trying to calculate concentration index
convenient regression method but everytime I run my do file, I get 
different results using exactly the same data. I am sure someone can

Here is what I am doing:

glcurve y [aw=weight], pvar(rank) replace nograph      
qui sum x [fw=weight]	
scalar mean=r(mean)      
qui sum rank [fw=weight]   
sca var_rank=r(Var)     
gen lhs=2*var_rank*(x/mean)          
regr lhs rank [pw=weight], cluster(commune)      
sca CI=_b[rank]        
display "concentration index", CI

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index