Learn R Programming

unmarked (version 0.8-5)

unmarkedMultFrame: Create an unmarkedMultFrame.

Description

This function constructs an unmarkedMultFrame object.

Usage

unmarkedMultFrame(y, siteCovs, obsCovs, numPrimary, yearlySiteCovs,
    plotArea)

Arguments

y
A matrix of the observed data.
siteCovs
Data frame of covariates that vary at the site level.
obsCovs
Data frame of covariates that vary within site-year-observation level.
numPrimary
Number of primary time periods (seasons in the multiseason model).
yearlySiteCovs
Data frame containing covariates at the site-year level.
plotArea
optional vector of plot areas.

Value

  • an unmarkedFrame object

Details

unmarkedMultFrame objects are used by colext.

For a study with M sites, T years, and a maximum of J observations per site-year, the data are shaped as follows. y is an $M \times TJ$ matrix, with each row corresponding to a site. siteCovs is a data frame with $M$ rows. yearlySiteCovs is a data frame with $MT$ rows which are in site-major, year-minor order. obsCovs is a data frame with $MTJ$ rows, which are ordered by site-year-observation, so that a column of obsCovs corresponds to as.vector(t(y)), element-by-element. The number of years must be specified in numPrimary.

If the data are in long format, the convenience function formatMult is useful for creating the unmarkedMultFrame.