SHAZAM Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error message after running a "do" command in bootstrapping

Hi all, I have got some problem when computing standard deviations for metafrontier parameters, which I have estimated previously, through bootstrapping. The error message starts after the do command and it says syntax error when generating variable. I appreciate your help. See the error message and the command that I have used below. Note that xstarb are previously estimated. |_sample 1 556 |_matrix q = cowva |_matrix qstar = xstarb |_matrix e = q-qstar |_dim beta 5 1000 |_set nodoecho |_set nooutput |_set ranfix |_do #=1, 1000 |_gen newe = samp(e)*SQRT(N/(N-K)) |_sample 1 556 |_stat newe |_gen qnew = qstar+newe |_OLS qnew feed vet herd price / COEF=beta:4 |_endo $ ...ERROR..SYNTAX ERROR WHEN GENERATING VARIABLE |_matrix bstre = newe' $ ...ERROR..SYNTAX ERROR WHEN GENERATING VARIABLE |_matrix beta = beta' |_set output |_sample 1 1000 |_stat bstre ...ERROR..VARIABLE bstre DOES NOT EXIST. |_sample 1 1000 |_stat beta |_stop The command I have used is :

dim cowva 556 read (cow.txt) cowva / beg=1 end=556 list sample 1 556 matrix q = cowva matrix qstar = xstarb matrix e = q-qstar dim beta 5 1000 set nodoecho set nooutput set ranfix do #=1, 1000 gen newe = samp(e)SQRT(N/(N-K)) sample 1 556 stat newe gen qnew = qstar+newe OLS qnew feed vet herd price / COEF=beta:4 endo matrix bstre = newe' matrix beta = beta' set output sample 1 1000 stat bstre sample 1 1000 stat beta stop

Thanks, Sirak

error message after running a "do" command in bootstrapping

Hi all, I have got some problem when computing standard deviations for metafrontier parameters, which I have estimated previously, through bootstrapping. The error message starts after the do command and it says syntax error when generating variable. I appreciate your help. See the error message and the command that I have used below. Note that xstarb x*starb are previously estimated. estimated.

 |_sample 1 556
 |_matrix q = cowva
 |_matrix qstar = xstarb
x*starb
 |_matrix e = q-qstar
 |_dim beta 5 1000
 |_set nodoecho
 |_set nooutput
 |_set ranfix
 |_do #=1, 1000
 |_gen newe = samp(e)*SQRT(N/(N-K))
 |_sample 1 556
 |_stat newe
 |_gen qnew = qstar+newe
 |_OLS qnew feed vet herd price / COEF=beta:4
 |_endo
                                    $
 ...ERROR..SYNTAX ERROR WHEN GENERATING VARIABLE
 |_matrix bstre = newe'
                      $
 ...ERROR..SYNTAX ERROR WHEN GENERATING VARIABLE
 |_matrix beta = beta'
 |_set output
 |_sample 1 1000
 |_stat bstre
 ...ERROR..VARIABLE bstre    DOES NOT EXIST.
 |_sample 1 1000
 |_stat beta
 |_stop

The command I have used is :

dim cowva 556
read (cow.txt) cowva / beg=1 end=556 list
sample 1 556
matrix q = cowva
matrix qstar = xstarb
x*starb
matrix e = q-qstar
dim beta 5 1000
set nodoecho
set nooutput
set ranfix
do #=1, 1000
gen newe = samp(e)SQRT(N/(N-K))
samp(e)*SQRT(N/(N-K))
sample 1 556
stat newe
gen qnew = qstar+newe
OLS qnew feed vet herd price / COEF=beta:4
endo
matrix bstre = newe'
matrix beta = beta'
set output
sample 1 1000
stat bstre
sample 1 1000
stat beta
stop

stop

Thanks, Sirak

error message after running a "do" command in bootstrapping

Hi all, I have got some problem when computing standard deviations for metafrontier parameters, which I have estimated previously, through bootstrapping. The error message starts after the do command and it says syntax error when generating variable. I appreciate your help. See the error message and the command that I have used below. Note that x*starb are previously estimated.

 |_sample 1 556
 |_matrix q = cowva
 |_matrix qstar = x*starb
 |_matrix e = q-qstar
 |_dim beta 5 1000
 |_set nodoecho
 |_set nooutput
 |_set ranfix
 |_do #=1, 1000
 |_gen newe = samp(e)*SQRT(N/(N-K))
 |_sample 1 556
 |_stat newe
 |_gen qnew = qstar+newe
 |_OLS qnew feed vet herd price / COEF=beta:4
 |_endo
                                    $
 ...ERROR..SYNTAX ERROR WHEN GENERATING VARIABLE
 |_matrix bstre = newe'
                      $
 ...ERROR..SYNTAX ERROR WHEN GENERATING VARIABLE
 |_matrix beta = beta'
 |_set output
 |_sample 1 1000
 |_stat bstre
 ...ERROR..VARIABLE bstre    DOES NOT EXIST.
 |_sample 1 1000
 |_stat beta
 |_stop

The command I have used is :

dim cowva 556
read (cow.txt) cowva / beg=1 end=556 list
sample 1 556
matrix q = cowva
matrix qstar = x*starb
matrix e = q-qstar
dim beta 5 1000
set nodoecho
set nooutput
set ranfix
do #=1, 1000
 gen newe = samp(e)*SQRT(N/(N-K))
 sample 1 556
 stat newe
 gen qnew = qstar+newe
 OLS qnew feed vet herd price / COEF=beta:4
endo
matrix bstre = newe'
matrix beta = beta'
set output
sample 1 1000
stat bstre
sample 1 1000
stat beta
stop

Thanks, Sirak