eFrameS: eFrameS

View source: R/eFrame.R

eFrameSR Documentation

eFrameS

Description

eFrameS creates an eFrameS 'stacked' data object for use with closed population n-mixture or single season occupancy models using the robust design where sampling occurs over a number of primary and secondary periods. Data for each primary period is 'stacked' into rows with an indicator variable added to identify each primary period. The data can then be analysed using closed population models to estimate the trend in abundance between primary periods.

Usage

eFrameS(ys, siteCovs = NULL, obsCovs = NULL, delta = NULL)

Arguments

ys

A data.frame of the observed data for each site M in rows and secondary periods J in columns, indexed by session (primary period) T. The data.frame ys must contain a column session with at least two unique values. The dimensions of ys are thus MT rows and J+1 columns

siteCovs

A data.frame of covariates that vary at the site level. This should have M rows and one column per covariate

obsCovs

A list of matrices or data.frames of variables varying within sites. Each matrix or data.frame must be of dimension MT x J.

delta

A vector with elements giving the time units between primary periods for each site beginning with 1 for the first primary period. A default value of 1 is used to indicate equal time intervals between primary periods.

Value

a eFrameS holding stacked data for each primary period.

Examples

 ys<- san_nic_open$counts

 emf<-eFrameS(ys)
 summary(emf)


dslramsey/eradicate documentation built on March 16, 2024, 1:40 p.m.