## S3 method for class 'secr':
predict(object, newdata = NULL, se.fit = TRUE, alpha = 0.05,
savenew = FALSE, scaled = FALSE, \dots)
detectpar (object, ...)secr object output from secr.fitse.fit = FALSE, a dataframe identical to newdata except for the addition of one column for each `real' parameter. Otherwise, a list with one component for each row in newdata. Each component is a dataframe with one row for each `real' parameter (density, g0, sigma, b) and columns as below
newdata has only one row, the structure of the list is
`dissolved' and the return value is one data frame.
For detectpar, a list with the estimated values of detection
parameters (e.g., g0 and sigma if detectfn = "halfnormal"). In the case
of multi-session data the result is a list of lists (one list per
session).vars component of object.
Optional newdata should be a dataframe with a column for each of the variables in the model (see `vars' component of object). If newdata is missing then a dataframe is constructed automatically. Default newdata are for a naive animal on the first occasion; numeric covariates are set to zero and factor covariates to their base (first) level.
Standard errors are by the delta method (Lebreton et al. 1992). Confidence intervals are backtransformed from the link scale.
The argument scaled applies only to the detection parameters g0
and sigma, and only to models fitted with scalesigma or
scaleg0 switched on. If scaled is TRUE then each estimate is multiplied by
its scale factor (1/D^0.5 and 1/sigma^2 respectively).
The value of newdata is optionally saved as an attribute.
detectpar is used to extract the detection parameter estimates
from a simple model to pass to functions such as
esa.plot. detectpar calls predict.secr. Parameters
will be evaluated by default at base levels of the covariates, although
this may be overcome by passing a one-line newdata to
predict via the ...argument. Groups and mixtures are a
headache for detectpar: it merely returns the estimated detection
parameters of the first group or mixture.secr.fit, predictDsurface## load previously fitted secr model with trap response
## and extract estimates of `real' parameters for both
## naive (b = 0) and previously captured (b = 1) animals
predict (secrdemo.b, newdata = data.frame(b=0:1))
temp <- predict (secrdemo.b, newdata = data.frame(b=0:1),
save = TRUE)
attr(temp, "newdata")
detectpar(secrdemo.0)Run the code above in your browser using DataLab