makeUMF: makeUMF

makeUMFR Documentation

makeUMF

Description

Makes an unmarked frame for analysis using the unmarked package

Usage

makeUMF(
  object,
  parks = NA,
  points = NA,
  AOU = NA,
  years = NA,
  times = NA,
  visits = NA,
  reps = NA,
  frametype = "pcount",
  sitecovs = NULL,
  visitcovs = NA,
  obscovslist = NULL,
  trend = "none",
  output = "umf",
  ...
)

Arguments

object

An NCRNbirds object or a list of such objects.

points

A character vector. The names of one or more points where the data was collected.

AOU

A character vector. One or more AOU (American Onothological Union) codes of bird species.

years

A vector of numbers. Will return only data from the indicated years.

times

A numeric vector of length 1. Returns only data from points where the number of years that a point has been visited is greater or equal to the value of times. This is determined based on the data found in the Visits slot.

visits

A length 1 numeric vector, defaults to NA. Returns data only from the indicated visits.

reps

A numeric vector of length 1. Defaults to NA. Returns only data from points where the number of years that a point has been visited is greater or equal to the valuemax,site,dist,wind,sky, of times. This is determined based on the data found in the Visits slot.

frametype

Indicates the type of unmarkedFrame to make. "pcount", the default, uses number of decections for n-mixture modeling. "occu" is used for occupancy modeling.

sitecovs

A data.frame of site covariates created by the user. Each covariate should be in a separate column and point in its own row. This should not include a column of point names. Make sure that the order of the points in this data.frame macthes the order in the observation data. If the input object is a list and the desired output is a list than sitecovs should also be a list of data.frames with one data.frame for each park.

visitcovs

A characeter vector with names of visit covariates to be used which are obtained from the CovsXVisit function.makeUMF will automatically format these for use in unmarkedFrames. These will be formatted at a list of named data.frames

obscovslist

A named list of data.frames with observation covariates. Typically this will include covariates that ARE NOT returned by the CovsXVisit function.This will be used in conjuciton with the visit covariates specified by visitcovs. If the input object is a list and the desired output is a list than obscovslist should also be a list of lists with one list of observation covariates for each park. The covariates should be in order of Unit_Code, Year and Point_Name.

trend

Used for multi-year data sets to indicate if the year of observation shoud be included in the model. Options are "none" the default, "numeric" to indicate that year should be treated as a numeric value and "factor" to indicate that year should be treated as a factor. Note that if the trend is set to "numeric" it is centered to improve the odds of the model successfully fitting.

output

Either "umf" (the defautlt) or "list". Controls the output when object is a list. If "umf" the data from all NCRNbirds objects in the list will be combined into a single unmarked frame. If "list" then the output will be a list of unmarked frames - one for each NCRNbirds object in the input list.

...

Additional arguments passed to CountXVisit and from there to getBirds.

Details

This function simplifies the process for fitting of occupancy or N-mixture models (Royal 2004, Kery et al. 2005) to data in an NCRNbirds object or a list of such objects. The data is first extracted from the object(s) using the CountXVisit funciton. The data is then fed to the unmarkedFramePCount or unmarkedFrameOccufunction. The resulting object can then be passed to \ unmarkedBirds for analysis.

Value

Either an unmarkedFrameOccu or an unmarkedFramePcount object.

References

Kery, M. Royle, J.A. and Schmid. 2005. Modeling avian abundance from replicated counts using binomail mixutre models. Ecological Applications. 15: 1450-1461.

Royle, J. A. 2004. N-Mixture models for estimating population size from spatially replicated counts. Biometrics 60: 108-115.


NCRN/NCRNbirds documentation built on Aug. 28, 2023, 12:12 p.m.