SHAZAM Community
Ask Your Question
0

Metafrontier Estimation

asked 2014-09-10 03:59:27 +0000

TING LIN gravatar image

updated 2014-10-06 07:58:29 +0000

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
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-09-10 06:17:51 +0000

updated 2014-10-06 07:58:50 +0000

That Missing Value message is generally for information only, informing you there were missing values detected and the internal code used is -99999. i.e. When SHAZAM sees that value it treats it as a missing value.

However only by seeing the data file can we check the layout. So please can you upload your data and script files to this question so I can look at this and verify that the data was loaded as you intended.

To ensure that the data was read correctly you can manually place the -99999 into every missing value location yourself. It is also often useful to then use the WRITE command to write out the data. This will allow you to check that SHAZAM read the data as you intended.

edit flag offensive delete link more

Comments

Hi,I have sent the data and script files to your help email.Looking forward hearing back from you.Thank you so much!

TING LIN gravatar imageTING LIN ( 2014-09-10 08:04:59 +0000 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-09-10 03:59:27 +0000

Seen: 327 times

Last updated: Oct 06 '14