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

st: RE: RE: predict in xtfrontier


From   "Vidya Mahambare" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: predict in xtfrontier
Date   Tue, 25 Nov 2003 12:59:08 +0000

Yes, essentially I was trying to get STATA calculate 'predict te' for each of
the previous models and not just the last model as it normally does. 

I am using the method you suggested.

many thanks
vidya
 


>>> [email protected] 11/25/03 12:03pm >>>
It's important to know also _why_ the problem 
arises. 

In essence, -by:- controls the fitting of 
a sequence of models, while -predict- remembers the 
last model fitted. The two don't mesh here in terms of what 
you want. 

Nick 
[email protected] 

Nick Cox
 
> 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' 
> } 
 
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/
*
*   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