fit.xy | R Documentation |
fit.xy
A wrapper function for optim
to get maximum likelihood estimates of
detection hazard function paramters using forward and perpendicular distance data
(and any associated covariates), using estimated Markov model or hidden Markov model availability
prameters.
fit.xy(
pars,
xy,
FUN,
models = list(y = NULL, x = NULL),
pm,
Pi,
delta = delta,
theta.f = 0,
theta.b = 90,
W,
ymax,
dy,
nx = 50,
hessian = FALSE,
control = list(trace = 5, reltol = 1e-06, maxit = 200),
groupfromy = NULL
)
pars |
starting parameter values. |
xy |
data frame with one line per detection containing perpendicular distance ($x) and forward distance ($y) and any covariates in the model. |
FUN |
detection hazard functional form name (character). |
models |
list of characters with elements |
pm |
is a vector of state-dependent Bernoulli distribution parameters (interpretation: the probability of being available, given state). |
Pi |
is a Markov model transition matrix governing the transition between states. (Square matrix
with each dimension equal to that of |
delta |
is a vector specifying the stationary distribution of the Markov model governed by Pi. |
theta.f |
REDUNDANT parameter determining the max forward angle in view (must=0). |
theta.b |
REDUNDANT parameter determining the max forward angle in view (must=90). |
W |
perpendicular truncation distance for fitting. Must be greater than |
ymax |
maximum forward distance that things could be detected. Must be greater than |
dy |
resolution of forward distances for Markov model (typically observer speed times time step size). |
nx |
NOT SURE - I think it is redundant - CHECK |
hessian |
Logical; if TRUE Hessian matrix is returned |
control |
list controlling |
groupfromy |
a forward distance (y) below which all y's are grouped into a single interval in the likelihood function (i.e. exact y,s < groupfromy are combined into an interval rather than passed as exact distances). |
A list comprising optim
ouptut plus element $par containing the estimated parameters
on the same scale as input parameters pars (which are transformed before calling optim
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.