Thank you, Thomas and Kit, for replying.
I'm not sure either why the initial code doesn't behave as anticipated. The
lesson for me to learn is that the close brace in a -for- loop in Mata ought
not to be considered the same thing as the CONTINUE statement in FORTRAN.
Kit suggested:
Why not just do
for(j=1; j<=ncv; j++) {
if(sm) {
sm = sm*b
...
...
}
}
Personal style, mostly. Any pair of braces that I can avoid is one more
close brace that I don't have to worry about come debugging time. I doubt
that the compiler cares between a loop jump and an -if- statement block, but
probably ought to do some timing just to make sure.
Joseph Coveney
*
* 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/