Predict likelihood parameters or inflation factors for distance function objects
# S3 method for dfunc
predict(object, newdata, type = c("parameters"), ...)
An estimated dfunc object. See dfuncEstim
.
A data frame containing new values of the covariates at which predictions are to be computed.
The type of predictions desired. Currently, only type = "parameters" is implemented and returns parameters of the likelihood function.
Included for compatibility with generic predict
methods.
A matrix of predicted parameter for the distance function
estimated in dfunc
. Extent of the first dimension (rows) in
the returned matrix is equal to either the number of detection distances
in detectionData
or number of rows in newdata
.
The returned matrix's second dimension (columns) is
the number of canonical parameters in the likelihood
plus the number of expansion terms. Without expansion terms, the number
of columns in the returned matrix
is either 1 or 2 depending on the likelihood (e.g., halfnorm
has
one parameter, hazrate
has two).