[ADMB Users] conditional statement using parameter to be estimated

Tiffany Vidal tiffany.vidal at gmail.com
Fri May 23 14:29:17 PDT 2014


I'm just starting to use ADMB, and am interested in running a something
like a changepoint model. I am running into problems trying to use a
parameter, to be estimated, in a conditional statement. When estimating the
negative log likelihood I have code that looks like this:

    for(int n=1;n<=nobs;n++){


     else {


               nll +=

where cp is my changepoint parameter (intended to estimate a single year in
the series), bounded between 0 and max(year index), with an initial value
of 30 (max year index = 50). The point of this is to allow the random site
parameter to be estimated separately for the period before the changepoint
and after it.

The error that I receive is as follows:
error: no match for 'operator<' in
< ((df1b2_parameters*)this)->df1b2_parameters::cp'

Is this possible to do in this program? Thank you in advance for any
thoughts on how to execute this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20140523/ee998f33/attachment.html>

More information about the Users mailing list