Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Stata5 v Stata8

From   "Donal O'Neill" <>
Subject   st: RE: Stata5 v Stata8
Date   Mon, 23 Jun 2003 16:15:27 +0100

Here is a copy of the trace file leading up to the error. There seems to be a problem with the way I am calling the matrices. I have included a "tempname A B C D J I J K" command and putting the resulting matrix names in single quotes but that made no difference.

- matrix A=J(50,1,0)
- matrix B=J(50,1,0)
- matrix C=J(50,1,0)
- matrix D=J(50,1,0)
- matrix H=J(50,1,0)
- matrix I=J(50,1,0)
- matrix J=J(50,1,0)
- matrix K=J(50,1,0)
- set more 1
- sum `wage'
- gen `m1x'=0.5-`hb'
- gen `rx'= 4-0.5+2*`hb'
- gen `ix' = `rx'/50
- gen `mx'=sum(`ix')+`m1x' +`ix'/2
- sum `wage' if race==1
- gen `m1y'=_result(5)-`hw'
- gen `ry'= _result(6)- _result(5)+2*`hw'
- gen `iy' = `ry'/50
- gen `my'=sum(`iy')+`m1y' +`iy'/2
- while `c1'<=50 {c -(}
- noi di "Calculating fb(x) number = " `c1'
Calculating fb(x) number = 1
- replace `xo'=`mx'[`c1']
- replace `zx'=(`xo'-`wage')/(`hb'*`winfacx')
- replace `ttb' =(1/(sqrt(2*_pi)))*exp(-.5*`zx'^2)
- replace `sumttb'=sum(`ttb'/`winfacx') if _n<=`nblack'
- replace `kzxx'=normprob(`zx') if _n<=`nblack'
- replace `sumx'=sum(`kzxx') if _n<=`nblack'
- local i = `c1'
- matrix H[`i',1]=(1/(`nblack'))*`sumx'[`nblack']
{err}__00000N not found
{txt} matrix A[`i',1]=(1/(`nblack'*`hb'))*`sumttb'[`nblack']

At 14:24 23/06/03 +0100, you wrote:

Donal O'Neill
> Some time ago I wrote a program to estimate counterfactual
> wage densities
> using Stata 5.  The program worked fine but when Stata 6
> came out the same
> program would no longer run. Instead at certain points in
> the program I
> would get error messages like "_00005Q not found". It was
> not obvious to me
> at the time what had changed so my solution then was to
> continue using
> Stata 5 for this program but Stata 6 for everything else. I
> now use Stata 8
> but continue to use Stata 5 for this earlier analysis.
> After a couple of
> years I've finally decided its probably time to sort this
> out. Any ideas as
> to why the original program did not transfer from version 5
> to 6 (or 7 or
> 8) would be appreciated. The program itself is quite long
> but the error
> message seems to be occurring with simple "generate" or
> "replace" commands.

This would be a reference to a temporary name
which Stata regards as unassigned. I can't immediately
imagine why this would have been broken by
a change from Stata 5 to Stata 6, but it
is difficult to debug blindfold.

You could

. set trace on

and show us some or all of the log file up
until it crashes. This might be shorter
than the original program.


*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2019 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index