prep_for_fit: Trim sites that do not fit the criteria for model fitting

Description Usage Arguments Details

View source: R/prep_for_fit.R

Description

Trim sites that do not fit the criteria for model fitting

Usage

1
2
3
4
5
6
7
8
9
prep_for_fit(
  x,
  site.name = "SITE",
  abund.name = "counts",
  time.name = "year",
  model.cuts = c(5, 10),
  non.zero = 2,
  total = 10
)

Arguments

x

Steller sea lion count data for one DPS and age class, e.g., eDPS nonpups

site.name

Name of column with site names

abund.name

Name of the column with the abundance counts

time.name

Name of the column with the time (e.g., year) data

model.cuts

Number of nonzero surveys for each model type (see Details)

non.zero

Minimum number of nonzero counts for inclusion in model fitting. Must be >2.

total

Minimum total number of sea lions observed at the site over the time span considered

Details

The model.cuts is a 2-vector argument that provides the boundaries for each model type, 'const' (constant meand term), 'lin' (linear slope mean term) or 'gp' (Gaussian process mean term). E.g., the default value is model.cuts=c(3,10) which means that any site with less than or equal to 3 nonzero survey values with be fit with a 'const' model and if the number of nonzero counts is in (3,10] a 'lin' model is fitted, and so on.


dsjohnson/agTrendTMB documentation built on Jan. 1, 2021, 12:07 a.m.