Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: function evaluator


From   Peter Willemé <[email protected]>
To   [email protected]
Subject   st: function evaluator
Date   Mon, 09 Apr 2012 21:23:37 +0200

Dear all,
I keep getting the error (using Stata/SE 9.0)

(1997 missing values generated)
nllppl returned 199
verify that nllppl is a function evaluator program
r(199);

after running my program:

program nllppl
 syntax varlist (min = 2, max = 2) [if], at(name) lincoefs(numlist)
 tempname m1 w1 fi1
  local aa : word 1 of `lincoefs'
  local bb : word 2 of `lincoefs'
  local cc : word 3 of `lincoefs'
  local tau : word 4 of `lincoefs'
  scalar `m1' = `at'[1,1]
  scalar `w1' = `at'[1,2]
  scalar `fi1' = `at'[1,3]
 local logp : word 1 of `varlist'
 local t : word 2 of `varlist'
replace `logp' = `aa' - `bb'*(`tau' - `t')^{m1} + `cc'*(`tau' - `t')^{m1}*cos({w1}*ln(`tau'-`t')-{fi1}) `if'
end


In short, this program should estimate 3 nonlinear parameters (m, w and fi) using -nl- :

nl lppl @ lnp t if tel < 61, parameters(m w fi) initial(m 0.59 w 1.83 fi 175.3) lincoefs(`a' `b' `c' `tc')

There are 4 extra constants (a, b, c and tc) passed to the program, but they do not have to be estimated. What also puzzles me (and this may have something to do with the problem), is the statement "(1997 missing values generated)". I want to run the estimation on a subsample of the first 60 observations using -if-. This looks as if the sample selection does not work.

Many thanks for your help.
Peter




----------------------------------------------------------------------------

Disclaimer: please see "www.plan.be/disclaimer.html"

Please consider your environmental responsibility before printing this email

----------------------------------------------------------------------------

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index