| parseModel | R Documentation |
Parse an 'Rdistance' formula and produce a list containing all model parameters. This routine is not normally called directly by the user, but it might be helpful in simulations. It is called internally from the model estimation routines.
parseModel(
data,
formula = NULL,
likelihood = "halfnorm",
w.lo = 0,
w.hi = NULL,
expansions = 0,
series = "cosine",
x.scl = 0,
g.x.scl = 1,
outputUnits = NULL,
asymptoticSE = TRUE
)
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 |
outputUnits |
A string specifying the symbolic measurement
units for results. Valid units are listed in |
asymptoticSE |
Logical variable for whether to calculate
asymptotic standard errors. The default (TRUE) estimates an
asymptotic variance-covariance matrix for parameters based on the
likelihood's Hessian (2nd derivative). If maximization
has been performed by Nlminb or HookesJeeves, the asymptotic
Hessian is estimated using numeric second deriviatives
of the likelihood at the maximum likelihood solution. If
maximization was performed by Optim, the last Hessian of
the maximization is returned
by Optim and used
(see |
An Rdistance model frame, which is an object of class "dfunc". Rdistance model frames are lists containing distance model components but not estimates. Model frames contain everything necessary to fit an Rdistance mode, such as covariates, minimum and maximum distances, the form of the likelihood, number of expansions, etc. Rdistance model frames contain a subset of fitted Rdistance model components.
RdistDf, which returns an
Rdistance data frame;
dfuncEstim, which returns an
Rdistance fitted model.
data(sparrowDf)
ml <- Rdistance::parseModel(sparrowDf
, formula = dist ~ 1 + observer + groupsize(groupsize)
, likelihood = "halfnorm"
, w.lo = 0
, w.hi = NULL
, series = "cosine"
, x.scl = 0
, g.x.scl = 1
, outputUnits = "m"
)
class(ml) # 'dfunc', but no estimated coefficients
print(ml)
print.default(ml)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.