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

Re: st: predicting technical efficiency after frontier command: errormessage


From   smerryman@kc.rr.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: predicting technical efficiency after frontier command: errormessage
Date   Wed, 04 Aug 2004 07:22:33 -0500

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 <lexdvv@nottingham.ac.uk>
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/



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