| dE.multi | R Documentation |
Fits a detection function to off-transect distances collected by multiple observers.
dE.multi(
data,
formula,
likelihood = "halfnorm",
w.lo = setUnits(0, "m"),
w.hi = NULL,
expansions = 0,
series = "cosine",
x.scl = setUnits(0, "m"),
g.x.scl = 1,
warn = TRUE,
outputUnits = NULL
)
data |
An |
formula |
A standard formula object. For example, |
likelihood |
String specifying the likelihood to fit. Built-in likelihoods at present are "halfnorm", "hazrate", and "negexp". |
w.lo |
Lower or left-truncation limit of the distances in distance data.
This is the minimum possible off-transect distance. Default is 0. If
|
w.hi |
Upper or right-truncation limit of the distances
in |
expansions |
A scalar specifying the number of terms
in |
series |
If |
x.scl |
The x coordinate (a distance) at which the
detection function will be scaled. |
g.x.scl |
Height of the distance function at coordinate |
warn |
A logical scalar specifying whether to issue
an R warning if the estimation did not converge or if one
or more parameter estimates are at their boundaries.
For estimation, |
outputUnits |
A string specifying the symbolic measurement
units for results. Valid units are listed in |
An object of class 'dfunc' with the following components:
par: The vector of estimated parameter values.
Length of this vector is the sum of the following:
The number of columns of the design matrix. This equals the number of covariates in the distance function plus one for the intercept, assuming an intercept is included.
The number of constant parameters in the distance function. Constant parameters are those not related to covariates. For example, the exponent 'k' parameter for hazard rate likelihood, or the mixing fraction 'p' for the oneStep likelihood. This can be zero.
The number of expansion functions called for. This equals
the input expansions.
loglik: The maximized value of the log likelihood.
convergence: The convergence code. This code
is returned by the optimizing routine (e.g., optim or nlminb).
Values other than 0 indicate suspect convergence.
message: If maximization did not converge (convergence != 0),
this is the reason given by the optimizing routine.
varcovar: The variance-covariance matrix for coefficients
of the distance function, either estimated by the inverse of
the fit's Hessian or by bootstrapping.
If the likelihood is smooth (i.e., those listed by
Rdistance:::differentiableLikelihoods()),
Rdistance initially estimates the variance-covariance matrix using the
second derivative of the log likelihood surface
at the final estimates, where second derivatives are estimated by
numeric differentiation (in routine secondDeriv().
The variance-covariance matrix is re-set to NULL
if the Hessian is not positive-definite. If bootstrap resampling
has been performed (using abundEstim()), the variance-covariance
matrix is re-estimated using the bootstrap values of parameters
and automatically reset.
Error estimates derived from bootstrapping are generally
preferable to the asymptotic estimates, hence the automatic
re-set.
limits: A list containing the lower and upper limits of parameters.
evaluations: The number of likelihood evaluations performed by the
optimizer.
mf: An R 'model frame' containing the detections (within the strip
or circle) used in the fit, covariates specified in the formula,
and groupsizes. Column 'dist' contains the
observed distances. The intercept, if included in the model, is not
included as a column in this model frame. (Test whether an intercept
is included using attr(terms(return$mf), "intercept")).
Column offset(...) contains group sizes associated with
the values of dist. Name of the group size column is "offset(...)",
not "groupsize(...)", so that group sizes can be treated offsets in
other R routines. The mf component is a proper model.frame and contains
both terms and contrasts attributes. This model frame
contains only non-missing distances between w.lo and w.hi.
data: The original nested data frame subset to information required
to complete distance estimation. This data frame contains information
on replication (i.e., rows are sites and are re-sampled during bootstrapping),
missing distances, missing transect lengths, and distances outside the observation
strip (below w.lo or above w.hi).
formula: The distance function's formula.
dataName: Name of the original nested data frame.
likelihood: The name of the likelihood fitted to observation
distances.
w.lo: Left-truncation value used during the fit.
w.hi: Right-truncation value used during the fit.
expansions: The number of expansion terms.
series: The type of expansion used during estimation. This is
only relevant if expansions > 0.
x.scl: The distance at which the function has been scaled to some value.
This is the x at which g(x) = g.x.scl.
g.x.scl: The height of the distance function at distance x.scl.
outputUnits: A list of type symbolic_units containing the
physical measurement units used during estimation.
asymptoticSE: A logical scalar indication whether the
variance-covariance matrix in component varcovar is
asymptotic (TRUE; estimated from the Hessian) or bootstrap (FALSE;
estimated by bootstrap resampling).
optimizer: The optimizing routine used.
call: The original function call.
nCovars: The number of exogenous covariates fitted in the
distance function. Does not include the intercept.
LhoodType: The type of likelihood fitted. Currently, only 'parametric'
types are fitted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.