Description Usage Arguments Details Value Examples
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).
1 | make.density.design.matrix(Dmodel, mask, nsessions = 1)
|
model |
density model |
mask |
secr mask object (or list of mask objects). |
Uses the gam
function from the mgcv
package to generate the design matrix (by setting fix = FALSE
).
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
.
1 2 3 | data(Boland.leopards1)
X = make.density.design.matrix(~s(x, k = 3), Boland.mask1)
head(X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.