Running examples in ‘npsf-Ex.R’ failed
The error most likely occurred in:

> ### Name: coef.npsf
> ### Title: 'coef' method for class 'npsf'
> ### Aliases: coef.npsf
> ### Keywords: Stochastic Frontier Analysis Model Truncated normal
> ###   Parametric efficiency analysis summary
> 
> ### ** Examples
> 
> require( npsf )
>  
> # Load Penn World Tables 5.6 dataset
>  
> data( pwt56 )
> head( pwt56 )
  Nu   Country year         Y         K        L
1  1 Argentina 1965 111816094  48458293 8723.365
2  2 Australia 1965 100476324  95761324 4729.188
3  3   Austria 1965  44574720  26379295 3257.910
4  4   Belgium 1965  63764552  54864755 3584.292
5  5   Bolivia 1965   5169986   3449239 1290.883
6  6    Canada 1965 170490192 141228266 7664.203
>  
> # Create some missing values
>  
> pwt56 [4, "K"] <- NA 
>  
> # Stochastic production frontier model with 
> # homoskedastic error components (half-normal)
>  
> # Use subset of observations - for year 1965
>  
> m1 <- sf(log(Y) ~ log(L) + log(K), data = pwt56, 
+  subset = year == 1965, distribution = "h")
Warning: This is a cross-sectional model

Optimization using 'mlmaximize': 

Iteration   0 (at starting values):       log likelihood = -39.21904371749

Iteration   1 (hessian is analytical,   1 in total):   log likelihood = -33.15243662031
Iteration   2 (hessian is analytical,   2 in total):   log likelihood = -32.55764247049
Iteration   3 (hessian is analytical,   3 in total):   log likelihood = -32.47276141781
Iteration   4 (hessian is analytical,   4 in total):   log likelihood = -32.47249183672
Iteration   5 (hessian is analytical,   5 in total):   log likelihood = -32.47249076553

Convergence given g inv(H) g' = 5.916217e-11 < lmtol

Final log likelihood = -32.4724908


Log likelihood maximization completed in
0.025 seconds
_____________________________________________________________

Cross-sectional stochastic (production) frontier model

Distributional assumptions

  Component      Distribution Assumption   
1 Random noise:  normal       homoskedastic
2 Inefficiency:  half-normal  homoskedastic

Number of observations = 51

-------------------- Estimation results: --------------------

                          Coef.        SE       z       P>|z|
_____________________________________________________________
Frontier
                                                                 
(Intercept)              4.8631     0.8035    6.05     0.0000 ***
log(L)                   0.4654     0.0774    6.01     0.0000 ***
log(K)                   0.5240     0.0597    8.78     0.0000 ***
-------------------------------------------------------------
Random noise component: log(sigma_v^2)
                                                                 
lnVARv0i_(Intercept)    -1.8384     0.6738   -2.73     0.0064 ** 
-------------------------------------------------------------
Inefficiency component: log(sigma_u^2)
                                                                 
lnVARu0i_(Intercept)    -1.9712     2.1177   -0.93     0.3520    
-------------------------------------------------------------
Parameters of compound error distribution
                                                                 
sigma_v                  0.3988     0.1344    2.97     0.0030 ** 
sigma_u                  0.3732     0.3952    0.94     0.3450    
lambda                   0.9358     1.2876    0.73     0.4674    
gamma                    0.4669     0.6849    0.68     0.4955    
_____________________________________________________________
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

------------ Summary of technical efficiencies: -------------

             JLMS:= exp(-E[ui|ei])
             Mode:= exp(-M[ui|ei])
               BC:= E[exp(-ui)|ei]

Error in dimnames(x) <- dn : 
  length of 'dimnames' [2] not equal to array extent
Calls: sf -> .su1 -> colnames<-
Execution halted