Vector input in INITIALIZATION_SECTION

2 views
Skip to first unread message

Mahmood Jokar

unread,
Apr 6, 2020, 12:01:25 PM4/6/20
to ADMB Users
Hi, 
I have two questions:

1- How to define default values for a vector parameter in INITIALIZATION_SECTION?  I want to define initial values for a vector x(1,100).

2- I need to find the c++ source file of '-lmn N' and '-lmn2 N' command line options in the ADMB documentation. However I couldn't find any c++ file with mentioned names in the ADMB documentation. How can I find the c++ source code of these methods?

Thanks

Ian Taylor - NOAA Federal

unread,
Apr 6, 2020, 1:06:52 PM4/6/20
to Mahmood Jokar, ADMB Users
Hi Mahmood,
Here are a couple quick answers for you:

1. There are a variety of ways to set initial parameter values, including the following (see page 1-30 of ADMB manual for a bit more detail):
  • For bounded parameters (such as in init_bounded_vector) the default initial value is the average of the lower and upper bounds
  • You can set the vector equal to values read from the .dat file (or other specified file) in the DATA_SECTION
  • You can supply a .par file. This file is automatically created containing parameter estimates at the end of estimation, but can be modified to contain whatever values you want.
2. Searching the github site for "limited memory quasi newton" got me to this file: https://github.com/admb-project/admb/blob/master/src/nh99/lmnewton.cpp  

Hopefully this helps,
-Ian

--
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@admb-project.org.

John Sibert

unread,
Apr 7, 2020, 12:26:56 PM4/7/20
to Mahmood Jokar, ADMB Users
You can add a PRELIMINARY_CALCS_SECTION where you can basically do
anything you want. It is invoked before the first function evaluation.
Note there are a verity of "fill" functions that will populate vectors.

Also, as Ian points out you can generate a version of a par file
"model_name.pin" that will contain initial values for every parameter.
Go to http://api.admb-project.org/ and search for "fill".

John
> --
> To unsubscribe from this group and stop receiving emails from it, send
> an email to users+un...@admb-project.org
> <mailto:users+un...@admb-project.org>.

Reply all
Reply to author
Forward
0 new messages