Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

D.designdata

Construct Density Design Data


Description

Internal function used by secr.fit, confint.secr, and score.test.

Usage

D.designdata (mask, Dmodel, grouplevels, sessionlevels, sessioncov =
NULL, meanSD = NULL)

Arguments

mask

mask object.

Dmodel

formula for density model

grouplevels

vector of group names

sessionlevels

vector of character values for session names

sessioncov

optional dataframe of values of session-specific covariate(s).

meanSD

optional external values for scaling x- and y- coordinates

Details

This is an internal secr function that you are unlikely ever to use. Unlike secr.design.MS, this function does not call model.matrix.

Value

Dataframe with one row for each combination of mask point, group and session. Conceptually, we use a 3-D rectangular array with enough rows to accommodate the largest mask, so some rows in the output may merely hold space to enable easy indexing. The dataframe has an attribute ‘dimD’ that gives the relevant dimensions: attr(dframe, "dimD") = c(nmask, ngrp, R), where nmask is the number of mask points, ngrp is the number of groups, and R is the number of sessions. Columns correspond to predictor variables in Dmodel.

The number of valid rows (points in each session-specific mask) is stored in the attribute ‘validMaskRows’.

For a single-session mask, meanSD is a 2 x 2 matrix of mean and SD (rows) for x- and y-coordinates. For a multi-session mask, a list of such objects. Ordinarily these values are from the meanSD attribute of the mask, but they must be specified when applying a new mask to an existing model.

See Also


secr

Spatially Explicit Capture-Recapture

v4.4.1
GPL (>= 2)
Authors
Murray Efford
Initial release
2021-05-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.