profile_ll: Profile (concentrated) likelihood evaluation for GAI

View source: R/functions.R

profile_llR Documentation

Profile (concentrated) likelihood evaluation for GAI

Description

A function which evaluations the profile negative log likelihood of our observed count data, given the user model specifications of a GAI model.

Usage

profile_ll(
  par,
  obs,
  skeleton,
  a_choice = "mixture",
  dist_choice = "P",
  spline_specs = list(df = 10, degree = 3),
  N = NULL,
  returnN = F,
  DMs = list(),
  returnA = F
)

Arguments

par

A vector of estimated parameters for the model

obs

A matrix of observations. Rows for sites and columns for occasions.

skeleton

The skeleton which tells this function how to relist the estimated parameters.

a_choice

The character name of the method used to estimate the seasonal trend. Either "mixture", "stopover" or "splines".

dist_choice

The distribution for the observed counts, can be "P" (poisson), "NB" (negative binomial), "ZIP" (zero inflated poisson)

spline_specs

A list containing the df (degrees of freedom) and the 'degree' for the splines.

N

optionally, instead of using the profile likelihood approach to estimate N (the superpopulation at each site), it can be supplied as a vector or integer.

returnN

if TRUE, returns the vector estimate of N and the matrix a_func instead of the LL

DMs

A list of design matrices if covariates have been included

returnA

If TRUE, will also include the flight pattern densities


calliste-fagard-jenkin/GAI documentation built on July 26, 2022, 11:20 a.m.