[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: predict in xtfrontier
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.
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.
> 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
* For searches and help try: