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

st: RE: predict in xtfrontier


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

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/



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