estimateNmales: Estimation of the Number of Male Capercaillie in the Pyrenees...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/estimateNmales.R

Description

The function estimateNmales can be used to obtain estimates of the number of male capercaillie in each geographic region of the Pyrenees mountains from a model of the lek count data and a model of the probability of presence of unknown leks.

The function getTotal can be used to obtain estimate of the number of male capercaillie in the whole area.

The function changeRate can be used to obtain estimate of the rate of change of the number of males between two periods.

The functions showChangeRate and distritime can be used to plot the posterior distribution of rate of changes between two periods and the posterior distribution of the number of males for each period respectively. They rely on the package ggplot2, and can be combined with other functions from this package (e.g. ggtitle to add a title, etc.).

The function summary can be used to display summary statistics on the number of males in a region of interest (or on the whole area).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
estimateNmales(coefsCounts, coefsUL, gridFrame, NKAL, NKIL,
               what = c("tot", "kalc", "kilc", "ulc", "ul"))

## S3 method for class 'estimateMales'
print(x, ...)

getTotal(x, ...)

changeRate(object, GR, changeRatePeriods = c(1, 5))

## S3 method for class 'estimateMales'
summary(object, GR, CIlevel = 80,
                                changeRatePeriods = c(1, 5),
                                threshold = c(-10, 10), ...)

showChangeRate(object, GR, changeRatePeriods = c(1, 5),
               quantiles = c(0.1, 0.5, 0.9))

distritime(x, xlab = "Period",
           ylab = "Number of cocks", trim = 0.95)

Arguments

coefsCounts

object of class mcmc.list containing the MCMC iterations of a registered model for lek count data.

coefsUL

object of class mcmc.list containing the MCMC iterations of a registered model for grid cell search data.

gridFrame

A data frame containing the list of grid cells present in the Pyrenees mountains (see help("gridFrame")), required to estimate the number of cocks in the whole mountains.

NKAL

A vector of length 5 (the 5 geographic regions) containing the number of known active leks in each geographic region.

NKIL

A vector of length 5 (the 5 geographic regions) containing the number of known indeterminate leks in each geographic region.

what

character string indicating in which compartment should the number of males be estimated: "tot" (default) returns the estimation of the total number of males; "kalc","kilc" respectively return the estimation of the number of males on respectively known active and known indeterminate leks; "ulc" returns the estimation of the number of males on unknown leks; and "ul" returns the estimation of the number of unknown leks.

object,x

object of class "estimateMales"

GR

integer value indicating the number of the geographic region for which a summary is required. If missing, the summary is shown for the whole area.

CIlevel

numeric value indicating the level for credible intervals

changeRatePeriods

vector of length two indicating the number of the two periods used to calculate the change rate (defaulting to the calculation of the rate between the first and fifth period).

threshold

vector of length two indicating the change rate thresholds (in percent) defining a decrease/stability/increase of the population size.

quantiles

vector of numeric values indicating which quantile should be shown on the plot.

xlab

character string indicating the label for the x axis

ylab

character string indicating the label for the y axis

trim

numeric value indicating how to trim the distribution to avoid outliers compressing the display. The 100*(1-trim)% of the largest MCMC simulations of the number of males averaged over all periods are removed prior to the plot.

...

additional arguments to be passed to other functions.

Value

An object of class "estimateMales", which is a list with 5 components (the 5 regions), each component being a matrix with M rows (MCMC iterations) and P columns (periods), containing M simulations of the number of males in each region for each period under the model.

The function getTotal returns a matrix with M rows (MCMC iterations) and P columns (periods), containing M simulations of the number of males on the whole area for each period under the model.

The function changeRate returns a vector with M elements (MCMC iterations) containing the M simulations of the rate of change of the number of males in the region (or on the whole area) between the two periods indicated in the arguments.

The summary returned by the function summary can be stored as a list.

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr

References

Calenge C., Menoni E., Milhau B., Foulche K, Chiffard J., Marchandeau S. (in prep.). The participatory monitoring of the capercaillie in the French Pyrenees.

See Also

getTotal for further functions to work with objects of class "estimateMales"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Number of known active and indeterminate leks
NKAL <- c(14L, 64L, 76L, 48L, 46L)
NKIL <- c(6L, 80L, 102L, 32L, 96L)


## The list of coefficients are stored as datasets
nm <- estimateNmales(coefModelCountDetectBinREY, coefModelULPresence,
                     gridFrame, NKAL, NKIL)

## Summary for the whole area
summary(nm)

## show the distribution of the number of males
## on the whole area
distritime(getTotal(nm))

## Rate of change between period 1 and 5
showChangeRate(nm)

ClementCalenge/caperpyogm documentation built on Sept. 14, 2021, 4:14 p.m.