Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: predict in xtfrontier


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: predict in xtfrontier
Date   Tue, 25 Nov 2003 15:20:06 -0000

No programming needed. 

egen maxte = max(te), by(sector) 
gen relte = te/maxte 

If no values of -te- were missing, you 
could do it in one 

bysort sector (te) : gen relte = te/te[_N] 

However, the -sort- in -bysort- would 
push any missings in -te- to the end, 
so the -egen- route is safer.  

Nick 
[email protected] 

P.S. I don't know where year enters into 
this, due to ignorance of frontier models. 
I stopped studying economics in 1969. But 
the basic approach here can be refined. 

Vidya Mahambare
> 
> I have now created estimates for TE for each sector 
> following Nick Cox's
> suggestion. I would now like to compute TE for  each firm 
> in a sector relative
> to maximum TE in that sector in a particular year. 
> 
> I am not sure how to proceed, mainly due to the lack of 
> understanding of
> programming. 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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