[ADMB Users] NLS example

dave fournier davef at otter-rsch.com
Fri Feb 22 13:41:15 PST 2013

I'm sure R users would be interested in this!

This example runs beautifully with

     -crit 1.e-10

It is part of some excel bashing on the R list in


there is na example description


Wonder how nls does in R

tpl,dat and pin files are attached.

> On 13-02-22 02:40 PM, dave fournier wrote:
>> On 13-02-22 11:33 AM, Ben Bolker wrote:
>> I agree that backwards compatibility is important.
>>   We could go back to having a robust flag which would
>> activate the options.   I think a lot of the existing trouble with this
>> data
>> set is with
>> the bounds on tmpL and u.
>> That was probably why sometimes -noinit would crash
>> There will always be a new data set
>> that will break something.
>    Of course.  I just don't want to break *old* data sets, or at least I
> want to allow people to be able to un-break things if the default
> settings break them ...
>>> On 13-02-22 02:28 PM, dave fournier wrote:
>>>> On 13-02-22 07:26 AM, Ben Bolker wrote:
>>>> Then I reran the model and the variances got stuck near 0.
>>>> a small penalty for a while fixes that.  So I think a model
>>>> something like this would be good.
>>>>>       Hans, can you put this version of the glmmADMB TPL file up on
>>>>> the SVN
>>>>> repository so the buildbot will build it?  It includes a beta-binomial
>>>>> likelihood option and Dave's latest NB tweak ...
>>>>>      (I probably do have write access to the SVN repository if I could
>>>>> figure it out, but I only have to do this a few times a year so I'm
>>>>> being lazy ...)
>>>>>      thanks
>>>>>        Ben
>>>     Thanks, Dave.  I will look this over and try to understand the bits
>>> and pieces.  If possible I would like to try to make the upper bound on
>>> the random effects values into a user-settable parameter (controlled by
>>> admb.opts/admbControl) ...  Now that we have code that people are using,
>>> I worry a lot about making backward-incompatible changes (i.e. this code
>>> makes some models run OK, but breaks others that are out there in the
>>> wild somewhere).
>>>     cheers
>>>       Ben

-------------- next part --------------
  init_int n
  init_matrix data(1,n,1,2)
  vector x
  vector Y
 !! x=column(data,2);
 !! Y=column(data,1);
  init_vector b(1,4)
   objective_function_value f
  dvar_vector num=b(1)*(square(x)+x*b(2));
  dvar_vector den=square(x)+x*b(3)+b(4);
  dvar_vector predY= elem_div(num,den);
-------------- next part --------------
# starting values 1
 25 39 41.5 39
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nlstest.dat
Type: application/x-ns-proxy-autoconfig
Size: 434 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20130222/17ab906d/attachment.dat>

More information about the Users mailing list