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

st: RE: RE: nl within another nl


From   "FEIVESON, ALAN H. (AL) (JSC-SD) (NASA)" <alan.h.feiveson@nasa.gov>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: nl within another nl
Date   Tue, 26 Nov 2002 11:41:58 -0600

Nick - 

Even when I make the parameter lists identical (names and number) I get the
same error. Any other suggestions?

Al


- gen double `RESID' = `YVAR'-`YHAT' if `touse'
- scalar `gm2' = 1
- local scaled ""
- }
- reg `RESID' `Z' `exp' if `touse', nocons
- scalar `old_ssr' = e(rss)*`gm2'
- local done 0
- local its 0
- tempname hest
- while ~`done' {
- if "`log'" == "" {
- noi di in gr "Iteration " `its' ":  " _c
Iteration 0:  - if "`trace'"!="" { noi di }
- }
- local j 1
- while `j' <= `np' {
- local old_pj = ${``j''}
invalid syntax








-----Original Message-----
From: Nick Cox [mailto:n.j.cox@durham.ac.uk]
Sent: Tuesday, November 26, 2002 9:27 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: nl within another nl


FEIVESON, ALAN
> 
> I am trying to use nl-program#2 within the first part 
> ("query" section) of
> nl-program#1 to obtain first guesses. To my surprise, the 
> nl#2 actually ran
> properly, however something got messed up when I got to the 
> iteration part
> of nl#1. Here are some of the  program statements from 
> Stata's nl routine
> where the error occured. Any clues as to what is messed up 
> or how to get
> around this? Is it because the number of parameters in nl#2 
> is smaller than
> the number in nl#1? 
> 
> - local old_pj = ${``j''}
> invalid syntax
> 
> 
> - - - - - - - - - - -  - - -- - - - - - - - - - - - - -- - 
> - - - - - - - - -
> - - -- - - - - - - - - - -  - - -

This is the message you would get 
if the jth parameter were undefined, 
so that 

$``j'' 

reduces to 

$`' 

Hence my guess is that your guess is a good one. 

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/



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