Running ‘fail.R’ [1s/1s]
  Running ‘frontier41.R’ [1s/1s]
  Running ‘frontierTest.R’ [29s/36s]
  Running ‘nestedModels.R’ [2s/3s]
  Running ‘translogRay.R’ [1s/2s]
  Running ‘translogRayMult.R’ [3s/3s]
  Running ‘wrongSkewness.R’ [1s/2s]
Running the tests in ‘tests/fail.R’ failed.
Complete output:
  > library( "frontier" )
  Loading required package: micEcon
  
  If you have questions, suggestions, or comments regarding one of the 'micEcon' packages, please use a forum or 'tracker' at micEcon's R-Forge site:
  https://r-forge.r-project.org/projects/micecon/
  Loading required package: lmtest
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  
  Please cite the 'frontier' package as:
  Tim Coelli and Arne Henningsen (2013). frontier: Stochastic Frontier Analysis. R package version 1.1. http://CRAN.R-Project.org/package=frontier.
  
  If you have questions, suggestions, or comments regarding the 'frontier' package, please use a forum or 'tracker' at frontier's R-Forge site:
  https://r-forge.r-project.org/projects/frontier/
  > library( "plm" )
  > options( digits = 5 )
  > 
  > ## example data included in FRONTIER 4.1 (cross-section data)
  > data( front41Data )
  > front41Data$firmNo <- c( 1:nrow( front41Data ) )
  > 
  > ## non-existing variable
  > try( sfa( log( output ) ~ log( capital7 ) + log( labour ),
  +    data = front41Data ) )
  Error in eval(predvars, data, env) : object 'capital7' not found
  > 
  > ## nParamTotal > nObs
  > try( sfa( log( output ) ~ log( capital ) + log( labour ),
  +    data = front41Data[ 1:4, ] ) )
  Error in sfa(log(output) ~ log(capital) + log(labour), data = front41Data[1:4,  : 
    the model cannot be estimated, because the number of parameters (5) is larger than the number of observations (4)
  > 
  > ## nParamTotal >> nObs
  > try( sfa( log( output ) ~ log( capital ) + log( labour ),
  +    data = front41Data[ 1:2, ] ) )
  Error in sfa(log(output) ~ log(capital) + log(labour), data = front41Data[1:2,  : 
    the model cannot be estimated, because the number of parameters (5) is larger than the number of observations (2)
  > 
  > ## nParamTotal > number of valid observations
  > try( sfa( log( output ) ~ log( capital ) + log( labour ) + log( firmNo - 56 ),
  +    data = front41Data ) )
  Error in sfa(log(output) ~ log(capital) + log(labour) + log(firmNo - 56),  : 
    the model cannot be estimated, because the number of parameters (6) is larger than the number of valid observations (4)
  In addition: Warning message:
  In log(firmNo - 56) : NaNs produced
  > 
  > ## the dependent variable has only infinite values
  > try( sfa( log( 0 * output ) ~ log( capital ) + log( labour ),
  +    data = front41Data ) )
  Error in sfa(log(0 * output) ~ log(capital) + log(labour), data = front41Data) : 
    the dependent variable has no valid observations
  > 
  > ## the dependent variable has only NA values
  > try( sfa( log( -output ) ~ log( capital ) + log( labour ),
  +    data = front41Data ) )
  Error in sfa(log(-output) ~ log(capital) + log(labour), data = front41Data) : 
    the dependent variable has no valid observations
  In addition: Warning message:
  In log(-output) : NaNs produced
  > 
  > ## one of the regressors has only infinite values
  > try( sfa( log( output ) ~ log( 0 * capital ) + log( labour ),
  +    data = front41Data ) )
  Error in sfa(log(output) ~ log(0 * capital) + log(labour), data = front41Data) : 
    regressor 'log(0 * capital)' has no valid observations
  > 
  > ## one of the regressors has only NA values
  > try( sfa( log( output ) ~ log( capital ) + log( -labour ),
  +    data = front41Data ) )
  Error in sfa(log(output) ~ log(capital) + log(-labour), data = front41Data) : 
    regressor 'log(-labour)' has no valid observations
  In addition: Warning message:
  In log(-labour) : NaNs produced
  > 
  > ## one of the regressors of the inefficiency term has only infinite values
  > try( sfa( log( output ) ~ log( capital ) + log( labour ) | log( 0 * firmNo ),
  +    data = front41Data ) )
  Error in sfa(log(output) ~ log(capital) + log(labour) | log(0 * firmNo),  : 
    the regressor for the inefficiency term 'log(0 * firmNo)' has no valid observations
  > 
  > ## one of the regressors of the inefficiency term has only NA values
  > try( sfa( log( output ) ~ log( capital ) + log( labour ) | log(-firmNo ),
  +    data = front41Data ) )
  Error in sfa(log(output) ~ log(capital) + log(labour) | log(-firmNo),  : 
    the regressor for the inefficiency term 'log(-firmNo)' has no valid observations
  In addition: Warning message:
  In log(-firmNo) : NaNs produced
  > 
  > ## no convergence
  > a1 <- sfa( log( output ) ~ log( capital ) + log( labour ),
  +    data = front41Data, maxit = 2 )
  Warning message:
  In sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  :
    the maximum number of iterations has been reached; please try again using different starting values and/or increase the maximum number of iterations
  > print( summary( a1 ), digits = 2 )
  Error Components Frontier (see Battese & Coelli 1992)
  Inefficiency decreases the endogenous variable (as in a production function)
  The dependent variable is logged
  Iterative ML estimation terminated after 2 iterations:
  maximum number of iterations reached
  
  final maximum likelihood estimates
               Estimate Std. Error z value Pr(>|z|)
  (Intercept)      0.58       0.97     0.6      0.6
  log(capital)     0.28       0.95     0.3      0.8
  log(labour)      0.53       0.40     1.3      0.2
  sigmaSq          0.22       1.00     0.2      0.8
  gamma            0.80       1.00     0.8      0.4
  log likelihood value: -17.033 
  
  cross-sectional data
  total number of observations = 60 
  
  mean efficiency: 0.73919 
  > 
  > ## no convergence, L(MLE) < L(OLS)
  > a2 <- sfa( log( output ) ~ log( capital ) + log( labour ),
  +    data = front41Data, maxit = 2, start = c( 1, 0, 0, 1, 0.5 ) )
  Warning message:
  In sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  :
    the maximum number of iterations has been reached and the likelihood value of the ML estimation is less than that obtained using OLS; please try again using different starting values and/or increase the maximum number of iterations
  > print( summary( a2 ), digits = 2 )
  Error Components Frontier (see Battese & Coelli 1992)
  Inefficiency decreases the endogenous variable (as in a production function)
  The dependent variable is logged
  Iterative ML estimation terminated after 2 iterations:
  maximum number of iterations reached
  
  final maximum likelihood estimates
               Estimate Std. Error z value Pr(>|z|)
  (Intercept)      1.12       0.98     1.1      0.3
  log(capital)     0.20       0.96     0.2      0.8
  log(labour)      0.51       0.58     0.9      0.4
  sigmaSq          0.98       0.98     1.0      0.3
  gamma            0.36       0.90     0.4      0.7
  log likelihood value: -56.035 
  
  cross-sectional data
  total number of observations = 60 
  
  mean efficiency: 0.64843 
  > 
  > ## no convergence, L(MLE) < L(OLS), wrong skewness
  > a3 <- sfa( log( output ) ~ log( capital ) + log( labour ),
  +    data = front41Data, maxit = 2, ineffDecrease = FALSE )
  Warning messages:
  1: In sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  :
    the residuals of the OLS estimates are left-skewed and the likelihood value of the ML estimation is less than that obtained using OLS; this usually indicates that there is no inefficiency or that the model is misspecified
  2: In sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  :
    the maximum number of iterations has been reached; please try again using different starting values and/or increase the maximum number of iterations
  > print( summary( a3, effMinusU = FALSE ), digits = 1 )
  Error Components Frontier (see Battese & Coelli 1992)
  Inefficiency increases the endogenous variable (as in a cost function)
  The dependent variable is logged
  Iterative ML estimation terminated after 2 iterations:
  maximum number of iterations reached
  
  final maximum likelihood estimates
               Estimate Std. Error z value Pr(>|z|)
  (Intercept)      0.19       0.99     0.2      0.9
  log(capital)     0.28       0.98     0.3      0.8
  log(labour)      0.53       0.77     0.7      0.5
  sigmaSq          0.11       0.72     0.2      0.9
  gamma            0.05       0.99     0.0      1.0
  log likelihood value: -18.46 
  
  cross-sectional data
  total number of observations = 60 
  
  mean efficiency: 1.0617 
  > 
  > ## L(MLE) < L(OLS)
  > a4 <- sfa( log( output ) ~ log( capital ) + log( labour ),
  +    data = front41Data, start = c( 1, 0, 0, 1, 0.999995 ) )
  Warning messages:
  1: In sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  :
    the likelihood value of the ML estimation is less than that obtained using OLS; this indicates that the likelihood maximization did not converge to the global maximum or that there is no inefficiency (you could try again using different starting values)
  2: In sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  :
    the parameter 'gamma' is close to the boundary of the parameter space [0,1]: this can cause convergence problems and can negatively affect the validity and reliability of statistical tests and might be caused by model misspecification
  > print( summary( a4 ), digits = 1 )
  Error Components Frontier (see Battese & Coelli 1992)
  Inefficiency decreases the endogenous variable (as in a production function)
  The dependent variable is logged
  Iterative ML estimation terminated after 10 iterations:
  cannot find a parameter vector that results in a log-likelihood value
  larger than the log-likelihood value obtained in the previous step
  
  final maximum likelihood estimates
               Estimate Std. Error z value Pr(>|z|)    
  (Intercept)    -6e+00      4e+00    -1.5      0.1    
  log(capital)    7e-01      9e-01     0.7      0.5    
  log(labour)     1e+00      9e-01     1.6      0.1    
  sigmaSq         3e+01      3e+00    12.4   <2e-16 ***
  gamma           1e-08      3e-06     0.0      1.0    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  log likelihood value: -162.91 
  
  cross-sectional data
  total number of observations = 60 
  
  mean efficiency: 0.99954 
  > 
  > ## too many starting values 
  > try( sfa( log( output) ~ log( capital ) + log( labour ), data = front41Data,
  +    truncNorm = TRUE, startVal = c( 0.5, 0.3, 0.5, 0.5, 0.9, -1, 0.3 ) ) )
  Error in sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  : 
    wrong number of starting values (you provided 7 starting values but the model has 6 parameters)
  > 
  > ## too few starting values 
  > try( sfa( log( output) ~ log( capital ) + log( labour ), data = front41Data,
  +    truncNorm = TRUE, startVal = c( 0.5, 0.3, 0.5, 0.5, 0.9 ) ) )
  Error in sfa(log(output) ~ log(capital) + log(labour), data = front41Data,  : 
    wrong number of starting values (you provided 5 starting values but the model has 6 parameters)
  > 
  > ## one explanatory variable specifiec twice (works)
  > sfa( log( output) ~ log( capital ) + log( labour ) + log( capital ), 
  +    data = front41Data )
  
  Call:
  sfa(formula = log(output) ~ log(capital) + log(labour) + log(capital),      data = front41Data)
  
  Maximum likelihood estimates
   (Intercept)  log(capital)   log(labour)       sigmaSq         gamma  
         0.562         0.281         0.536         0.217         0.797  
  > 
  > ## perfect multicollinearity -> NAs in OLS coefficiencts
  > front41Data$capital10 <- 10 * front41Data$capital
  > try( sfa( log( output) ~ log( capital ) + log( labour ) + log( capital10 ), 
  +    data = front41Data ) )
  Error in sfa(log(output) ~ log(capital) + log(labour) + log(capital10),  : 
    at least one coefficient estimated by OLS is NA: log(capital10). This may have been caused by (nearly) perfect multicollinearity
  > 
  > ## perfect multicollinearity -> 2 NAs in OLS coefficiencts
  > front41Data$capitalLabour <- front41Data$capital * front41Data$labour
  > try( sfa( log( output) ~ log( capital ) + log( labour ) + log( capital10 ) + 
  +       log( capitalLabour ), data = front41Data ) )
  Error in sfa(log(output) ~ log(capital) + log(labour) + log(capital10) +  : 
    at least one coefficient estimated by OLS is NA: log(capital10), log(capitalLabour). This may have been caused by (nearly) perfect multicollinearity
  > 
  > 
  > ## load data abour rice production in the Phillipines
  > data( "riceProdPhil")
  > 
  > ## nobs > nn * nt 
  > rd <- riceProdPhil
  > rd <- rbind( rd, rd[ 11, ] )
  > rd <- pdata.frame( rd, c( "FMERCODE", "YEARDUM" ), row.names = FALSE )
  Warning message:
  In pdata.frame(rd, c("FMERCODE", "YEARDUM"), row.names = FALSE) :*** buffer overflow detected ***: terminated
  Aborted