# fxi.secrgam: Probability Density of Home Range Centre In david-borchers/secrgam: Spatially Explicit Capture-Recapture with Generalised Additive Density Models

## Description

Calculates the probability density function for the estimated location of one or more range centres, i.e. f(X | Ω). Acts as a wrapper function for `fxi.secr`.

## Usage

 ```1 2``` ```fxi.secrgam(fit, i = 1, col = 1:length(i), X = NULL, plt = TRUE, add = FALSE, sessnum = 1, border = 0, normal = TRUE, ...) ```

## Arguments

 `fit` a fitted secrgam model (returned from `secrgam.fit`) `i` integer or character vector of individuals for which to plot contours `col` integer or character vector of colour for individuals' contours `X` 2-column matrix of x- and y- coordinates (e.g. the original mask) `plt` logical to do contour plot `add` logical to add to existing plot `sessnum` session number if `fit\$capthist` spans multiple sessions `border` width of blank margin around the outermost detectors `normal` logical; should values of pdf be normalised? `...` additional arguments passed to contour.

## Details

`fxi.secr` returns a vector of probability densities assuming a uniform density distribution,

f(x_i | ω_i) = P(ω_i | x_i) / ∑ P(ω_i | x_i)

`fxi.secrgam` returns a vector of probability densities for any density distribution,

f(x_i | ω_i) = P(ω_i | x_i) D(x_i) / ∑ [ P(ω_i | x_i) D(x_i) ]

Needs to be tested for cases where density model has fixed parameters. Also assumes that log link is used for density.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ```data(Boland.fits1) # capture history data plot(fit1.a3\$capthist) # look at data for animal 20 animal = 20 k = apply(fit1.a3\$capthist[animal,,], 2, sum) > 0 points(traps(fit1.a3\$capthist)[k,], col = 2, pch = 19) fxi.secrgam(fit1.a3, i = animal, add = TRUE) ```

david-borchers/secrgam documentation built on May 14, 2019, 9:30 p.m.