|
Prep (Do file
1)
use ba
se_perform
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: iterative kolmogorov smirnov
From
"irodriguez" <[email protected]>
To
[email protected]
Subject
st: iterative kolmogorov smirnov
Date
Tue, 27 Jun 2006 15:47:55 -0300
encode firm,
gen(cod_firma)
keep if
cod_sector==12
keep if
initial_year==1999
reshape long roa,
i(firm) j(year)
destring roa,
replace
Coco (Do file
2)
capture gen
estrato=1
capture gen fa=1
replace estrato=1 if
estrato==0
sum cod_firma
return list
local
numfirmas=r(max)
forvalues
k=1/`numfirmas' {
replace fa=.
replace fa=1 if
estrato==1
capture replace fa=0 if
cod_firma==`k' & estrato==1
capture ksmirnov roa, by(fa)
capture return list
capture replace estrato=0 if
r(p)<0.05 & fa==0
}
tab estrato
Una (Do file 3)
replace estrato=. if
estrato==0
do coco
tab estrato
Media (Do file
4)
Summarize if estrato==1
Tab cod_firma estrato
Rep (Do file
5)
drop if
estrato==1
replace estrato=1
do coco
tab estrato
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |