predictedprobabilities: Predicted Probabilities ** would be great to test these...

Description Usage Arguments Value Functions Examples

Description

Predicted Probabilities ** would be great to test these functions by monitoring z, p and mu.p in runjags (perhaps using hidden.monitor parameter)

Usage

1
2
3
4
5
6
7
Endetect_modelsite(fit, type = "median", conditionalLV = TRUE)

pdetect_indvisit(fit, type = "median", conditionalLV = TRUE)

pdetect_condoccupied(fit, type = "median")

poccupy_species(fit, type = "median", conditionalLV = TRUE, numLVsims = 10000)

Arguments

fit

is a fitted runjags model

type

is the type of point estimate to use. See get_theta(). If type is marginal then gives probability of each species seperately (marginal over other species?) using full posterior draw.

conditionalLV

If TRUE returned probabilities are conditioned on estimated latent variable values (and species are independent due to model structure) If FALSE returned probabilities assume no knowledge of the latent variable values and that species are independent.

Xobs

A matrix of observation (detection) coefficients. Default is the observation coefficients saved in fit

ModelSite

A list mapping each row in Xobs to the row in Xocc that represents the ModelSite visited.

Xocc

A matrix of occupancy coefficient, with each row corresponding to a ModelSite (i.e. a spatial location and year). If NULL the Xocc data saved in fit will be used.

Value

A 2 dimensional array. For each species (column) and each model site (row), the expected number of detections.

A matrix of detection probabilities. Each row is a visit, corresponding to the rows in Xobs. Each column is a species.

A matrix of detection probabilities. Each row is a visit, corresponding to the rows in Xobs. Each column is a species.

A matrix of occupany probabilities. Each row is a ModelSite, corresponding to the rows in Xocc. Each column is a species.

Functions

Examples

1
2
3
fit <- readRDS("./tmpdata/deto_wind.rds")
pDetection <- pdetect_indvisit(fit, type = "median", conditionalLV = FALSE)
pOccupancy <- poccupy_species(fit, type = "median", conditionalLV = FALSE)

sustainablefarms/linking-data documentation built on Oct. 28, 2020, 2:41 a.m.