D.designdata: Construct Density Design Data

D.designdataR Documentation

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.design.MS


secr documentation built on Oct. 18, 2023, 1:07 a.m.