Learn R Programming

Rdistance (version 2.1.3)

predict.dfunc: Predict method for dfunc objects

Description

Predict likelihood parameters or inflation factors for distance function objects

Usage

# S3 method for dfunc
predict(object, newdata, type = c("parameters"), ...)

Arguments

object

An estimated dfunc object. See dfuncEstim.

newdata

A data frame containing new values of the covariates at which predictions are to be computed.

type

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.

Value

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).