predict.dsm {dsm}R Documentation

Predict from a fitted density surface model

Description

Make predictions of density or abundance outside (or inside) the covered area.

Usage

## S3 method for class 'dsm'
predict(object, newdata = NULL, off.set = NULL, type = "response", ...)

Arguments

object

a fitted dsm object

newdata

spatially referenced covariates e.g. altitude, depth, distance to shore, etc. Covariates in the data.frame must have names identical to variable names used in fitting the model

off.set

area of each of the cells in the prediction grid. Should be in the same units as the segments/distances given to dsm. Replaces the column in newdata called off.set if it is supplied. Ignored if newdata is not supplied

type

what scale should the results be on. The default is "response", see predict.gam for an explanation of other options (usually not necessary)

...

any other arguments passed to predict.gam

Details

If newdata is not supplied, predictions are made for the data that built the model. Note that the order of the results will not necessarily be the same as the segdata (segment data) data.frame that was supplied to dsm.

The area off.set is used if that argument is supplied, otherwise it will look for the areas in the column named off.set in the newdata. Either way the link function (usually log) will be applied to the offsets, so there is no need to log them before passing them to this function.

Value

predicted values on the response scale by default (unless type is specified, in which case see predict.gam).

Author(s)

David L. Miller

See Also

predict.gam, dsm_var_gam, dsm_var_prop


[Package dsm version 2.3.3 Index]