getBugsData: Modify the bugs data object depending on the type of model...

View source: R/getBugsData.R

getBugsDataR Documentation

Modify the bugs data object depending on the type of model you are running

Description

This function is primarily for internal use within occDetFunc. It is used to update the bugs data according to the needs of each model type.

Usage

getBugsData(bugs_data, modeltype, verbose = FALSE, occDetData)

Arguments

bugs_data

The bugs data object. This is a list specified in occDetFunc as list(y = as.numeric(focal), Year = TP, Site = rownum, nyear = nTP, nsite = nrow(zst), nvisit = nrow(occDetdata[i,])). Where focal is a binary (0/1) of is the focal species is present, Year is the time periods or survey periods, Site are the site identifiers, nyear is the number of years in the data, nsite is hte number of sites and nVisit is the number of visits

modeltype

Character, one of: intercept, centering, jul_date, catlistlength, contlistlength. See occDetFunc for more information.

verbose

Logical, if true progress is reported to the console

occDetData

The 'raw' data used to create the bugs_data. This should have a column 'L' for list length and a column 'JulDate' for Julian date

Value

An updated bugs_data object


BiologicalRecordsCentre/sparta documentation built on May 2, 2024, 4:24 p.m.