[ADMB Users] PIN file
James R. Bence
bence at msu.edu
Sun Aug 7 11:07:27 PDT 2011
Adding a bit to what Dave said,
admb reads pin files just like it reads dat files, i.e., one number after
another. It assumes the there will be a number for each parameter and
assumes they will be in the same order as they are in the parameter
section. Just like in a dat file, a line starting with # is a
comment. Note this structure is identical to the structure of the .PAR
file containing the estimates after you run your program.
If a .PIN file exists, starting values you set there we take precedence
over any specifications you make in the INITIALIZATION_SECTION. If you
have lots of vectors that you would just as soon set all the values and/or
you have a large model with lots of parameters it can be tedious typing
everything in and tricky to make sure you did. A couple of tricks to make
1. Before you create a .PIN file, go ahead and set any vectors of
parameters to a single value in the INITIALIZATION_SECTION if that is what
you would do in the .PIN file.
2. Build your program to create an executable and run it with the
following argument -maxfn 0 This forces your program to quit
before it even passes through your procedure section. Obviously you don't
get valid estimates at this point but you do create a .PAR file with all
the parameters listed with there default starting values (and any you set
in the INITIALIZATION_SECTION).
3. Rename the resulting .PAR file as a .PIN. It has the right
structure. Edit any values to be more to your liking. Now you are ready
Note that most of this is described in the video "starting values" we
recently released accessible from a link on the admb-project site.
At 10:18 PM 8/6/2011, Saang-Yoon wrote:
>I recently learn the usage of PIN file for initialization of parameter
>When putting initial values for a *vector* using a PIN file, should I
>assign all values to *each elements* in the vector? Before using a
>PIN file, I used to put only one value even to a vector dimension
>INITIALIZATION_SECTION in a TPL file, and it worked well. However
>when I assign only one value to a vector in a PIN file, I run into the
>following error message:
> error reading parameters from file xxx.pin
>I suspect whether the error was due to the assignment of only one
>value to a vector. I would appreciate your response. Thank you.
>Users mailing list
>Users at admb-project.org
Dept. of Fisheries and Wildlife
Michigan State University
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users