parseModel | R Documentation |
Parse an 'Rdistance' formula and produce a list containing all model parameters.
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
)
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 |
This routine is not intended to be called by the user. It is called
from the model estimation routines in Rdistance
.
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(sparrowSiteData)
data(sparrowDetectionData)
sparrowDf <- Rdistance::RdistDf(sparrowSiteData
, sparrowDetectionData
, by = NULL
, pointSurvey = FALSE
, observer = "single"
, .detectionCol = "detections")
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.