make.density.design.matrix: Construct a design matrix from a density model

Description Usage Arguments Details Value Examples

Description

Helper function to create a design matrix from a conventional density formula (e.g. including s and/or te terms) and a mask object (i.e. a dataframe of covariates).

Usage

1
make.density.design.matrix(Dmodel, mask, nsessions = 1)

Arguments

model

density model

mask

secr mask object (or list of mask objects).

Details

Uses the gam function from the mgcv package to generate the design matrix (by setting fix = FALSE).

Value

Returns a matrix with number of rows equal to the number of rows in mask, and number of columns equal to the number of parameters required to implement the regresssion spline specified in model.

Examples

1
2
3

david-borchers/secrgam documentation built on May 14, 2019, 9:30 p.m.