As I understand it, you are fitting a separate
model for each sector, and want to pool the predictions.
Here is one way to do that:
levels sector, local(S)
gen te = .
foreach s of local S {
capture drop work
qui xtfrontier
logrgva time logwage logplnt if sector == `s', tvd
predict work if e(sample)
qui replace te = work if sector == `s'
}
Nick
[email protected]
Vidya Mahambare
> I am using 'xtfrontier' command for a C-D production
> function for 13 sectors as
> follows:
> bysort sector: xtfrontier logrgva time logwage logplant, tvd
>
> When I try to generate 'predict te', it is generated only
> for the last sector.
>
> Can I add any subcommand to create estimates of TE for each
> of the sectors? or
> do I have to run xtfrontier for each sector and generate te.
*
* 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/