[ADMB Users] Integrating R and ADMB to generalize TPL files

H. Skaug hskaug at gmail.com
Fri Nov 2 08:27:56 PDT 2012


This seems good to me: your model requires two design matrices
which you create in R and pass on to ADMB.

Your tpl looks very clean and well structured. Our example collection
http://www.admb-project.org/examples
needs many more examples, especially on the mark-recapture side.
If you ever get the time and interest in contributing with examples
to our website, give me a word and we will provide you with
access privilidges.

Hans

On Fri, Nov 2, 2012 at 12:32 PM, Jeff Laake <jefflaake at gmail.com> wrote:
> Non-linear models can have linear components where parameters in the
> non-linear base model are expressed as a linear function of covariates. This
> makes model.matrix useful to generalize the tpl file. The example I
> originally posted for distance sampling cannot be posed solely with
> model.matrix. I wasn't saying that. However, the parameters can be expressed
> as linear functions of the covariates which enables a base tpl file to work
> for a much broader set of models without modification and re-compilation.
>
> Here is another example where passing design matrices can be useful. The tpl
> file will fit any Cormack-Jolly-Seber model to mark-recapture data to
> estimate survival.  Both survival and capture probability are specified with
> a design matrix on the logit scale. It could be generalized with other link
> functions (eg. sin, probit)
>
> https://github.com/jlaake/R2admb/blob/master/Intro%20to%20R2admb/admbcjs.tpl
> https://github.com/jlaake/R2admb/blob/master/Intro%20to%20R2admb/admbcjs.dat
>
> I'm incorporating this into an R package which creates the admbcjs.dat file
> from a dataframe and formulas in R.  The above admbcjs.dat example is for
> the well-known dipper data with phi(.)p(t) (constant survival and
> time-varying capture prob).
>
> ADMB is a great piece of software. It will become more widely used outside
> of fisheries if it is integrated with other platforms like R  Ignoring that
> potential and making snide comments about R and R-users is not useful.
>
> regards --jeff



More information about the Users mailing list