R/predict.translogEst.R

Defines functions predict.translogEst

predict.translogEst <- function( object, newdata = NULL,
   dataLogged = object$dataLogged, ... ) {

   if( !is.null( newdata ) ) {
      if( dataLogged ) {
         logData <- newdata
      } else {
         logData <- logDataSet( data = newdata,
            varNames = c( object$xNames ),
            varNamesNum = object$shifterNames )
      }
   } else {
      logData <- NULL
   }
   
   result <- predict.quadFuncEst( object, newdata = logData, ... )
   
   if( !dataLogged ) {
      result <- exp( result )
   }

   return( result )
}

Try the micEcon package in your browser

Any scripts or data that you put into this service are public.

micEcon documentation built on Jan. 7, 2021, 3:01 p.m.