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

Re: st: predicting technical efficiency after frontiercommand: errormessage


From   "Dev Vencappa" <[email protected]>
To   <[email protected]>
Subject   Re: st: predicting technical efficiency after frontiercommand: errormessage
Date   Wed, 04 Aug 2004 14:23:32 +0100

>>
>>
Scott,
 thanks a lot for your solution to the problem. I followed your suggestion and made the necessary adjustment to the fron_p ado file. It is working fine now.  

Many thanks
Dev


>>> [email protected] 08/04/04 01:22pm >>>
Dev,

I was able to replicate this error.  When looking at the log, the problem appears to be the call to -fron_p.Calc-

---------------------------------------------------------------------------------------
       log:  C:\Documents and Settings\scott.merryman\Desktop\foo.smcl
  log type:  text
 opened on:   4 Aug 2004, 06:57:42

. predict te,te
------------------------------------------------------- begin predict ---
<snip>

---------------------------------------------------- begin fron_p.Calc ---
<snip>

    - else if "`e(het)'" == "uv" {
    = else if "uv" == "uv" {
    - tempvar xb_v sigma_v sigma_u
    - qui _predict double `xb_u' if `cond', xb eq(lnsig2u)
    = qui _predict double  if __000000, xb eq(lnsig2u)
too many variables specified
      qui gen double `sigma_u' = exp(0.5*`xb_u')
      qui _predict double `xb_v' if `cond', xb eq(lnsig2v)
      qui gen double `sigma_v' = exp(0.5*`xb_v')
      }
      }


What believe is the problem is that xb_u temporary variable is not declared before the -_predict double `xb_u' ...-

I have added xb_u to the tempvar line in -fron_p- and now it seems to work fine:

. clear

. use http://www.stata-press.com/data/r8/greene9.dta 

. encode state, gen(state_id)

. qui frontier lnv lnk lnl , vhet(capital) uhet(state_id )

. predict te,te


Of course, it is unwise to alter offical Stata programs; hopefully there will be an offical update to this soon.

Hope this helps,
Scott

----- Original Message -----
From: Dev Vencappa <[email protected]>
Date: Wednesday, August 4, 2004 6:28 am
Subject: st: predicting technical efficiency after frontier command:	error message

> >>
> >>
> Stata users,
> 
> I am running the following command.
>  
> 
>   reg lnrev lntoen lncap lntech lndebt
>   mat X=e(b)
>   local a=el(X,1,1)
>  local b=el(X,1,2)
>  local c=el(X,1,3)
>  local d=el(X,1,4)
> frontier lnrev lntoen lncap lntech lndebt, diff  uhet(lnass dumfra-
> dumother,noconstant)  vhet(lnass dumfra-dumother,noconstant) /*
> */from(lntoen=`a'  lncap=`b' lntech=`c' lndebt=`d')
> predict CDrev1,te
> 
> I am getting my parameter estimates and everything else fine, 
> except for the predict command which gives the following error 
> message.
> "  too many variables specified
>       r(103); "
> 
> I am basically modelling heteroscedasticity in both the one-sided 
> and two-sided error component. In contrast, when I model 
> heteroscedasticity in either one of them, then the predict command 
> works fine. I have read the manual and it does not say anything 
> about possible problems with predict, te when heteroscedasticity 
> is modelled for both error components.
>   Any explanation why this is happening?
> 
> Many thanks
> Dev
> 


*
*   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/


This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks.  Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


*
*   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