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
Please can you upload the cow.txt file so we can run this. It looks like the specification of COEF=beta:4 is incorrect. This would need to be COEF=beta
The errors are being caused by lines 5 and 6.
Can you provide the rest of the script so that we can see where x*starb is calculated and figure out the solution for you?
This is the whole command. It went well upto the do command it is only after then the error appeared.
(more)how can I send you the whole command and text files. Thanks, Sirak
Please email SHAZAM Help on the homepage. If you can include all the data files too would help.