Statalist The Stata Listserver


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

Re: st: RE: Pgm 2 remove grammatical errors in log


From   Robert A Yaffee <bob.yaffee@nyu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Pgm 2 remove grammatical errors in log
Date   Thu, 11 May 2006 08:30:07 -0400

Scott, 
   I ran three regressions on auto.dta.  Two were incorrect. When I
ran your program on it, the program seems to have left the error
indicators in the clean_log1.log file.
  - Bob


Robert A. Yaffee, Ph.D.
Research Professor
Shirley M. Ehrenkranz
School of Social Work
New York University

home address:
Apt 19-W
2100 Linwood Ave.
Fort Lee, NJ
07024-3171
Phone: 201-242-3824
Fax: 201-242-3825
yaffee@nyu.edu

----- Original Message -----
From: Scott Merryman <smerryman@kc.rr.com>
Date: Wednesday, May 10, 2006 10:44 pm
Subject: st: RE: Pgm 2 remove grammatical errors in log

> I believe this will work, assuming the error statements and 
> commands are not
> longer than 4 lines:
> 
> infix str90 logtext 1-90 using /// 
> "C:\Documents and Settings\Scott_2\Desktop\log1.log", clear
> 
> gen f1 = substr(logtext,1,2)
> gen byte f2= 1 if f1=="r("
> 
> replace f2 = 1 if f2[_n+3] == 1 & f1 != ""
> replace f2 = 1 if f2[_n+2] == 1 & f1[_n+2] == "r("
> replace f2 = 1 if f2[_n+1] == 1 & f1[_n+1] == "r("
> 
> drop if f2 == 1
> drop f2 f1
> outfile logtext using  /// 
> "C:\Documents and Settings\Scott_2\Desktop\clean_log1.log", /// 
> replace noquote  wide rjs
> 
> 
> Scott
> 
> 
> > -----Original Message-----
> > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> > statalist@hsphsun2.harvard.edu] On Behalf Of Robert A Yaffee
> > Sent: Wednesday, May 10, 2006 3:52 PM
> > To: statalist@hsphsun2.harvard.edu
> > Subject: st: Pgm 2 remove grammatical errors in log
> > 
> > 
> > Does anyone know of a Stata do-file or ado-file program that will go
> > through your log file, find the syntactical errors, and remove those
> > errors along with the commands that generated them, leaving a
> > syntactically perfect output?
> >   Once such garbage is removed, it's easier to check over the 
> output for
> > other errors.
> >    Thanks in advance,
> >   - Bob Yaffee
> > 
> 
> 
> *
> *   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/



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