[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Donal O'Neill" <doneill@may.ie> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: RE: Stata5 v Stata8 |

Date |
Mon, 23 Jun 2003 16:15:27 +0100 |

Nick,

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

- noi di "CALCULATING ADAPTIVE VALUES"

CALCULATING ADAPTIVE VALUES

- 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. Nick n.j.cox@durham.ac.uk * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Stata5 v Stata8***From:*"Donal O'Neill" <doneill@may.ie>

**st: RE: Stata5 v Stata8***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: Re: RE: cannot override "analysis time" in b1title for sts graph** - Next by Date:
**Re: st: RE: RE: Aggregating resutls of several t-tests** - Previous by thread:
**st: cannot override "analysis time" in b1title for sts graph** - Next by thread:
**st: Aggregating resutls of several t-tests** - Index(es):

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