Returns the fitted response over the range of one covariate, holding the others at their means, on the process's response scale (occupancy / detection probability, or abundance intensity).
Usage
tobs_marginal_effect(
object,
covariate,
process = c("occupancy", "detection", "abundance"),
n_points = 100L
)Examples
# \donttest{
sim <- simulate_abun(N = 100, J = 4, n_abund_covs = 2, n_det_covs = 1,
seed = 1)
fit <- tobs(~ abund_cov1 + abund_cov2, data = sim$data,
family = abun(K_max = 50), detection = ~ det_cov1, y = sim$y,
control = list(verbose = FALSE))
me <- tobs_marginal_effect(fit, "abund_cov1", process = "abundance")
head(me) # estimate is on the abundance (lambda) scale, not a probability
# }