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" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: predict in xtfrontier
Date   Tue, 25 Nov 2003 12:03:37 -0000

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 
n.j.cox@durham.ac.uk 

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/



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