SHAZAM Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I HAVE TRYED TRIAL SHAZAM SEVERAL TIMES FOR THeSe COMMANDs BUT IT SAYS :SYNTAX ERROE

this is my codes. * the file parMIDA.xlsx contains estimated parameters of group frontiers (by column) 1.set number of parameters etc gen1 nparms=36 gen1 ngroups=3 gen1 n1=882 gen1 n2=791 gen1 n3=714 *2.read the estimated parameters of the group frontiers sampl 1 nparms read (parMIDA.xlsx)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 sampl 1 n read (sfa1.txt) GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 sampl j2 k2 read (sfa2.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 sampl j3 k3 read (sfa3.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 sampl 1 n matrix x =|X1| X2| X3| X4| X5| X6| X7| X8| X9| X10| X11| X12| X13| X14| X15| X16| X17| X18| X19| X20| X21| X22| X23| X24| X25|X26|X27|X28|X29|X30|X31|X32|X33|X34| X35| dim x1 n1 nparms x2 n2 nparms x3 n3 nparms copy × x1 / frows=1;n1 trows=1;n1 copy × x2 / frows=j2;k2 trows=1;n2 copy × x3 / frows=j3;k3 trows=1;n3 do# = 1,ngroups matrix yhat# = x#b# endo matrix b = -(yhat1|yhat2|yhat3) * 4. OBTAIN AND PRINT PARAMETERS OF THE METAFRONTIER 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 = nparms2 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

I HAVE TRYED TRIAL SHAZAM SEVERAL TIMES FOR THeSe THESE COMMANDs BUT IT SAYS :SYNTAX ERROEERROR

this Here is my codes. * the

* The file parMIDA.xlsx contains estimated parameters of group frontiers (by column)
1.set number of parameters etc

* 1. SET NUMBER OF PARAMETERS ETC
gen1 nparms=36
gen1 ngroups=3
gen1 n1=882
gen1 n2=791
gen1 n3=714
*2.read the estimated parameters of the group frontiers

* 2. READ THE ESTIMATED PARAMETERS OF THE GROUP FRONTIERS
sampl 1 nparms
read (parMIDA.xlsx)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
sampl 1 n
read (sfa1.txt) GROUP Y  X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 
sampl j2 k2
read (sfa2.txt)GROUP Y  X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl j3 k3
read (sfa3.txt)GROUP Y  X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl 1 n
matrix x =|X1| = |X1| X2| X3| X4| X5| X6| X7| X8| X9| X10| X11| X12| X13| X14| X15| X16| X17| X18| X19| X20| X21| X22| X23| X24| X25|X26|X27|X28|X29|X30|X31|X32|X33|X34| X35|
dim x1 n1 nparms x2 n2 nparms x3 n3 nparms 
copy × x1 / frows=1;n1 trows=1;n1
copy × x2 / frows=j2;k2 trows=1;n2
copy × x3 / frows=j3;k3 trows=1;n3
do# = 1,ngroups
 matrix yhat# = x#b#
x#*b#
endo
matrix b = -(yhat1|yhat2|yhat3)
 * 4. OBTAIN AND PRINT PARAMETERS OF THE METAFRONTIER
stat x / means = xbar
matrix c = ((-xbar')|xbar)
((-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 = nparms2
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
x#*beta
  matrix mtr# = exp(yhat#)/exp(xbeta#)
 stat mtr#
 print mtr#
endo
stop

stop

I HAVE TRYED TRIAL SHAZAM SEVERAL TIMES FOR THESE COMMANDs BUT IT SAYS :SYNTAX ERROR

Here is my codes.

* The file parMIDA.xlsx contains estimated parameters of group frontiers (by column)

* 1. SET NUMBER OF PARAMETERS ETC
gen1 nparms=36
gen1 ngroups=3
gen1 n1=882
gen1 n2=791
gen1 n3=714

* 2. READ THE ESTIMATED PARAMETERS OF THE GROUP FRONTIERS
sampl 1 nparms
read (parMIDA.xlsx)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
sampl 1 n
read (sfa1.txt) GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 
sampl j2 k2
read (sfa2.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl j3 k3
read (sfa3.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl 1 n
matrix x = |X1| X2| X3| X4| X5| X6| X7| X8| X9| X10| X11| X12| X13| X14| X15| X16| X17| X18| X19| X20| X21| X22| X23| X24| X25|X26|X27|X28|X29|X30|X31|X32|X33|X34| X35|
dim x1 n1 nparms x2 n2 nparms x3 n3 nparms 
copy × x1 / frows=1;n1 trows=1;n1
copy × x2 / frows=j2;k2 trows=1;n2
copy × x3 / frows=j3;k3 trows=1;n3
do# = 1,ngroups
  matrix yhat# = x#*b#
endo
matrix b = -(yhat1|yhat2|yhat3)

* 4. OBTAIN AND PRINT PARAMETERS OF THE METAFRONTIER
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

Metafrontier and metatechnology estimation

I HAVE TRYED TRIAL have tried the following with the Trial version of SHAZAM SEVERAL TIMES FOR THESE COMMANDs BUT IT SAYS :SYNTAX ERROR

several times for these commands but it says :syntax error. What could be the cause?

Here is my codes. code.

* The file parMIDA.xlsx contains estimated parameters of group frontiers (by column)

* 1. SET NUMBER OF PARAMETERS ETC
gen1 nparms=36
gen1 ngroups=3
gen1 n1=882
gen1 n2=791
gen1 n3=714

* 2. READ THE ESTIMATED PARAMETERS OF THE GROUP FRONTIERS
sampl 1 nparms
read (parMIDA.xlsx)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
sampl 1 n
read (sfa1.txt) GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 
sampl j2 k2
read (sfa2.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl j3 k3
read (sfa3.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl 1 n
matrix x = |X1| X2| X3| X4| X5| X6| X7| X8| X9| X10| X11| X12| X13| X14| X15| X16| X17| X18| X19| X20| X21| X22| X23| X24| X25|X26|X27|X28|X29|X30|X31|X32|X33|X34| X35|
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;k3 trows=1;n3
do# = 1,ngroups
  matrix yhat# = x#*b#
endo
matrix b = -(yhat1|yhat2|yhat3)

* 4. OBTAIN AND PRINT PARAMETERS OF THE METAFRONTIER
stat x / means = xbar
matrix c = ((-xbar') | xbar)

((-xbar')|xbar)  
*' A
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

Metafrontier and metatechnology estimation

I have tried the following with the Trial version of SHAZAM several times for these commands but it says :syntax error. What could be the cause?

Here is my code.

* The file parMIDA.xlsx contains estimated parameters of group frontiers (by column)

* 1. SET NUMBER OF PARAMETERS ETC
gen1 nparms=36
gen1 ngroups=3
gen1 n1=882
gen1 n2=791
gen1 n3=714

* 2. READ THE ESTIMATED PARAMETERS OF THE GROUP FRONTIERS
sampl 1 nparms
read (parMIDA.xlsx)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
sampl 1 n
read (sfa1.txt) GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 
sampl j2 k2
read (sfa2.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl j3 k3
read (sfa3.txt)GROUP Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35
sampl 1 n
matrix x = |X1| X2| X3| X4| X5| X6| X7| X8| X9| X10| X11| X12| X13| X14| X15| X16| X17| X18| X19| X20| X21| X22| X23| X24| X25|X26|X27|X28|X29|X30|X31|X32|X33|X34| X35|
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;k3 trows=1;n3
do# = 1,ngroups
  matrix yhat# = x#*b#
endo
matrix b = -(yhat1|yhat2|yhat3)

* 4. OBTAIN AND PRINT PARAMETERS OF THE METAFRONTIER
stat x / means = xbar
matrix c = ((-xbar')|xbar)  
*' A
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