[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
jjc.li@utoronto.ca |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: Return r(111) this time |

Date |
Sun, 15 Mar 2009 17:18:29 -0400 |

Here's the return: . matrix a = J(1,62,0) . set trace on .

- version 10.1 - syntax varlist(min=16 max=16) [if], at(name) time-series operators not allowed

r(101); Jingjing Quoting Eva Poen <eva.poen@gmail.com>:

Jingjing, I'm not sure I understand you here. Are you referring to the linereplace `lnc' = 5+`aq'*`lnq' ...where there is a hard coded 5 (not a starting value! This is a set value.), and did you replace this value of 5 by another parameter, e.g. `a0'? In terms of the program, that is not a problem as long as you adjust your code. It would be easiest if you put this parameter last, since this saves you the pain of changing all your `at'[1,x] statements to `at'[1,x+1]. Therefore, my suggestion would be to code scalar `dmm'=`at'[1,61] tempname a0 scalar `a0' =`at'[1,62] quietly { replace `lnc' = `a0'+ .... } Now, for the debugging, just follow my suggestions earlier, and invoke your program directly. You need to create a matrix of initial values, e.g. zeros for all coefficients. If you have 62 parameters, you do matrix a = J(1,62,0) which gives you a row vector of 62 zeros. Next create copies of all your dependent variables, and invoke your program: set trace on nlsurwellbehav "copies of dep. variables" "right hand side variables" , at(a) and see where the problem lies. Eva 2009/3/15 <jjc.li@utoronto.ca>:Hi, First, I corrected all the typo. Then I changed constant item 5 to a0 in the first equation. I setted constant item a0 as a strating value 5 in my previous codes, because they did so in the example. Now I decide to scalar a new coef. a0. Is that ok? Or I need to set the constant item at other starting value? Second, I typed -set trace on- before running the stuff. Here's the error record: } -------------------------------------------------------------- end nlsurwellbehav --- - } - if _rc { - di as error "nlsur`eqn' returned " _rc = di as error "nlsurwellbehav returned " _rc nlsurwellbehav returned 111 - di as error "verify that nlsur`eqn' is a function evaluator program" = di as error "verify that nlsurwellbehav is a function evaluator program" verify that nlsurwellbehav is a function evaluator program - exit _rc } } ---------------------------------------------------------------- end nlsur.Estimate --- end nlsur --- r(111); I am thinking there maybe another kind of errors in my codes. Say there's two items in my equation: a*lne and b*lne*lne. I think I should define them as: replace `lnc'=`a'*`lne'+`b'*``lnpe'*`lne'' In my previous codes I defined them as: `lnc'=`a'*`lne'+`b'*`lnpe'*`lne' Does it cause the r(111)? Jingjing* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**RE: st: RE: Return r(111) this time***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**References**:**Re: st: Return code 199 after redoing the example in stata reference***From:*Kit Baum <baum@bc.edu>

**Re: st: Return code 199 after redoing the example in stata reference***From:*Eva Poen <eva.poen@gmail.com>

**st: Return r(111) this time***From:*jjc.li@utoronto.ca

**st: RE: Return r(111) this time***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: RE: Return r(111) this time***From:*Eva Poen <eva.poen@gmail.com>

**RE: st: RE: Return r(111) this time***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: RE: Return r(111) this time***From:*Eva Poen <eva.poen@gmail.com>

**Re: st: RE: Return r(111) this time***From:*jjc.li@utoronto.ca

**Re: st: RE: Return r(111) this time***From:*Eva Poen <eva.poen@gmail.com>

- Prev by Date:
**Re: st: RE: Return r(111) this time** - Next by Date:
**Re: st: RE: Return r(111) this time** - Previous by thread:
**Re: st: RE: Return r(111) this time** - Next by thread:
**RE: st: RE: Return r(111) this time** - Index(es):

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