estimate_outcomes: Estimate nesting outcomes

View source: R/outcome_funs.R

estimate_outcomesR Documentation

Estimate nesting outcomes

Description

estimate_outcomes fits a Bayesian hierarchical model to the histories of nest revisitation to estimate the outcome of nesting attempts.

Usage

estimate_outcomes(
  fixes,
  visits,
  model = "null",
  mcmc_params = list(burn_in = 1000, n_chain = 2, thin = 5, n_adapt = 1000, n_iter =
    10000)
)

Arguments

fixes

A matrix of the number of GPS fixes on each day of the nesting attempt as returned by format_attempts.

visits

A matrix of the number of nest visits on each day of the nesting attempt as returned by format_attempts.

model

Type of model to be run. One of "null", "p_time", "phi_time", or "phi_time_p_time".

mcmc_params

List of MCMC parameters. burn_in, n_chain, thin, n_adapt, n_iter

Details

Data can be passed from format_attempts to the function arguments fixes and visits.

The function runs a JAGS MCMC with uninformative priors for the estimation of nest survival. Parameters for the MCMC can be specified by the user by passing them as a list to mcmc_params.

The user can choose among four possible models: a null model with constant p and phi; a model where p varies with time; a model where phi varies with time; and a model where both p and phi vary with time.

Value

A list of mcarray objects.


picardis/nestR documentation built on July 2, 2024, 6:35 p.m.