produce_skeleton: Produce a skeleton for GAI parameters

View source: R/functions.R

produce_skeletonR Documentation

Produce a skeleton for GAI parameters

Description

Produces a skeleton object which can be used by relist to restructure a vector of parameters into a named list of parameters for a GAI model

Usage

produce_skeleton(
  a_choice = "mixture",
  distribution = "P",
  options = list(),
  DF = NULL
)

Arguments

a_choice

The character name for the seasonal trend function being fitted. options include "splines", "stopover", and "mixture"

distribution

The distribution of the counts, Poisson ("P"), Negative Binomial ("NB") or Zero-Inflated Poisson ("ZIP")

options

A list containing different specifications, which vary depending on the model. For stopover and mixture models this contains B (the number of broods), shared_sigma (boolean denoting if the SDs are the same for each component), mu_formula (specifying a formula which describes a covariate dependency for the mean arrival times for each brood), and sd_formula (similar, for the SD of each brood).

DF

If covariate relationships are specified, this is the data.frame which contains these covariate values for each observation.

Value

A named list containing 'skeleton', the skeleton of parameter values used by the model to relist optim guesses, and 'DMs', the list of design matrix objects which are required to obtain the correct parameter values in each case where the user has specified a formula


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