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

st: RE: -log2html- blocks while converting smcl file containing miximum likelihood


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: -log2html- blocks while converting smcl file containing miximum likelihood
Date   Fri, 30 May 2003 12:34:29 +0100

Renzo Comolli

> I am using -log2html- and it always blocks when it arrives
> to convert my
> maximum likelihood programs.
> The error message is "too few quotes"
> Any help would be appreciated. I have so many maximum likelihoods to
> convert.
>
> I am using Intercooled Stata 8 on Win98SE
> c:\ado\stbplus\l\log2html.ado
> *! log2html 1.2.0  cfb/njc  3Mar2003
> *! log2html 1.1.1  cfb/njc  17Dec2001
>
> I tried several log files.
> -log2html- starts generating the html file, but it always
> stops at this
> point.
> The generated html file reads
> . program define mylikelihood
>   1.         version 8.0
>   2.         args lnf theta1 theta2
> And stata returns "too few quotes"
>
>
> My smcl reads
> {com}. program define mylikelihood
> {txt}  1{com}.         version 8.0
> {txt}  2{com}.         args lnf theta1 theta2
> {txt}  3{com}.         quietly replace
> `lnf'=s*ln(norm((ln(Rincome_celing)-`theta1')/`theta2')) if
> $ML_y1==1
> {txt}  4{com}.         forvalues i = 2/22 {c -(}
> {txt}  5{com}.                 quietly replace
> `lnf'=s*ln(norm((ln(Rincome_celing)-`theta1')/`theta2')-norm
> ((ln(Rincome_flo
> or)-`theta1')/`theta2')) if $ML_y1==`i'
> {txt}  6{com}.         {c )-}
> {txt}  7{com}.         foreach i of numlist 23 198620 199121{c -(}
> {txt}  8{com}.                 quietly replace
> `lnf'=s*ln(1-norm((ln(Rincome_floor)-`theta1')/`theta2'))
> if $ML_y1==`i'
> {txt}  9{com}.         {c )-}
> {txt} 10{com}. end
>
> And my do file reads
> program define mylikelihood
> 	version 8.0
> 	args lnf theta1 theta2
> 	quietly replace
> `lnf'=s*ln(norm((ln(Rincome_celing)-`theta1')/`theta2')) if
> $ML_y1==1
> 	forvalues i = 2/22 {
> 		quietly replace
> `lnf'=s*ln(norm((ln(Rincome_celing)-`theta1')/`theta2')-norm
> ((ln(Rincome_flo
> or)-`theta1')/`theta2')) if $ML_y1==`i'
> 	}
> 	foreach i of numlist 23 198620 199121{
> 		quietly replace
> `lnf'=s*ln(1-norm((ln(Rincome_floor)-`theta1')/`theta2'))
> if $ML_y1==`i'
> 	}
> End
>

You've found a bug. I think I've fixed it. I'll send
a copy of the supposedly fixed program to Renzo
for test and communicate with Kit Baum, lead author of
-log2html-.

Nick
[email protected]

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index