For a specific set of parameter values, it computes and returns the negative
log-likelihood for the distance sampling likelihood for distances that are
unbinned, binned and a mixture of both. The function flnl is the
function minimized using optim from within
ddf.ds.
flnl(fpar, ddfobj, misc.options, fitting = "all")negative log-likelihood value at the parameter values specified in
fpar
parameter values for detection function at which negative log-likelihood should be evaluated
distance sampling object
a list with the following elements: width
transect width; int.range the integration range for observations;
showit 0 to 3 controls level debug output; integral.numeric if
TRUE integral is computed numerically rather than analytically;
point is this a point transect?
character "key" if only fitting key function
parameters, "adjust" if fitting adjustment parameters or "all"
to fit both
Jeff Laake, David L Miller
Most of the computation is in flpt.lnl in which the negative
log-likelihood is computed for each observation. flnl is a wrapper
that optionally outputs intermediate results and sums the individual
log-likelihood values.
flnl is the main routine that manipulates the parameters using
getpar to handle fitting of key, adjustment or all of the
parameters. It then calls flpt.lnl to do the actual computation of
the likelihood. The probability density function for point counts is
fr and for line transects is fx.
fx=g(x)/mu (where g(x) is the detection function); whereas,
f(r)=r*g(r)/mu where mu in both cases is the normalizing constant. Both
functions are in source code file for link{detfct} and are called from
distpdf and the integral calculations are made with
integratepdf.
flt.var, detfct