predict,occumbFit-method {occumb} | R Documentation |
Predict method for occumbFit class.
Description
Obtain predictions of parameters related to species occupancy
and detection from an occumbFit
model object.
Usage
## S4 method for signature 'occumbFit'
predict(
object,
newdata = NULL,
parameter = c("phi", "theta", "psi"),
scale = c("response", "link"),
type = c("quantiles", "mean", "samples")
)
Arguments
object |
An |
newdata |
An optional |
parameter |
The parameter to be predicted. |
scale |
The scale on which the prediction is made.
|
type |
The type of prediction.
|
Details
Applying predict()
to an occumbFit
object generates predictions
for the specified parameter (phi
, theta
, or psi
) based
on the estimated effects and the given covariates. It is important to
recognize that the predictions are specific to the individual species being
modeled since they depend on the estimated species-specific effects (i.e.,
alpha
, beta
, and gamma
; see
the package vignette for details).
When providing newdata
, it must thus be assumed that the set of
species contained in newdata
is the same as that of the data being
fitted.
Value
Predictions are obtained as a matrix or array that can have dimensions
corresponding to statistics (or samples), species, sites, and replicates.
The dimension
and label
attributes are added to the output
object to inform these dimensions.
If the sequence read count data y
has species, site, or replicate
names appended as the dimnames
attribute (see Details in
occumbData()
), they will be copied into the label
attribute of the returned object.