# Metafrontier Estimation

Hi all, I have got some problem when computing metafrontier parameters.I've followed the SHAZAM program given by Rao, O'Donnell and Battese.I have tried the command for several times but there is always some errors.It says "...MISSING OBSERVATION SET TO -99999". I appreciate your help very much. See the error message and the command that I have used below.

The file parm.txt contains estimated parameters of group frontiers (by column). The file sfa#.txt contains n# data observations for group#. Sections 1 and 3 are problem-specific.

```
1. SET NUMBERS OF PARAMETERS ETC.
gen1 nparms=8
gen1 ngroups=3
gen1 n1=100
gen1 n2=170
gen1 n3=120
2. READ THE ESTIMATED PARAMETERS OF THE GROUP FRONTIERS
sample 1 nparms
read(parm.txt)parm/rows=nparms cols=ngroups
do# = 1,ngroups
dim b# nparms
copy parm b# / fcols=#;# tcols = 1;1
endo
3. READ THE DATA AND CONSTRUCT DATA MATRICES AND VECTORS
gen1 j2=n1+1
gen1 j3=n1+n2+1
gen1 k2=n1+n2
gen1 n=n1+n2+n3
sample 1 n
genr one=1
genr dummy=0
Read (sfa1.txt) group t lnq lx1-lx7
sample j2 k2
read (sfa2.txt) group t lnq lx1-lx7
sample j3 n
read (sfa3.txt) group t lnq lx1-lx7
sample 1 n
matrix x = one|lx1|lx2|lx3|lx4|lx5|lx6|lx7
dim x1 n1 nparms x2 n2 nparms x3 n3 nparms
copy x x1/frows=1;n1 trows=1;n1
copy x x2/frows=j2;k2 trows=1;n2
copy x x3/frows=j3;n trows=1;n3
do #=1,ngroups
matrix yhat# = x#*b#
endo
matrix b = -(yhat1'|yhat2'|yhat3')'
stat x / means = xbar
matrix c = ((-xbar')|xbar')'
matrix A = (-x)|x
lp c A b / iter = 5000 primal = bstar
dim beta1 nparms beta2 nparms
gen1 p1=nparms+1
gen1 p2=nparms*2
copy bstar beta1 / frows=1;nparms trows=1;nparms
copy bstar beta2 / frows=p1;p2 trows=1;nparms
matrix beta = beta1-beta2
print beta
5. OBTAIN AND PRINT METATECHNOLOGY RATIOS
do# = 1,ngroups
matrix xbeta# = x#*beta
matrix mtr# = exp(yhat#)/exp(xbeta#)
stat mtr#
print mtr#
endo
stop
```