Description Usage Arguments Details Value Author(s) See Also Examples
Returns a 3D model matrix for capture-recapture modeling in the form of a (giant) 2D matrix.
1 | F.3d.model.matrix(formula, d1, d2)
|
formula |
A formula object specifying covariates in a capture-recapture
model. Must not have a response, i.e., ~, followed by the names
of 2-D arrays or 1-D vectors contained inside calls to |
d1 |
Magnitude of dimension 1 of the returned matrix. This is
always number of rows in the returned matrix. Usually, |
d2 |
Magnitude of dimension 2 of the returned matrix. This is number of columns in the capture history matrix. |
This routine is intended to be called internally by the routines of MRA. General users should never have to call this routine.
This routine uses a call to eval
with a model frame, and calls the
R internal model.matrix
to
resolve the matrices in the formula. All matrices specified in the models
should be in the current scope and accessible to both eval
and model.matrix
.
See help(F.cjs.estim)
for examples of ways to specify models.
A (giant) 2-d matrix containing covariate values suitable for passing to
the Fortran code that does the estimation for MRA. This matrix has all the
2-d matrices of the model cbind
-ed together. It's dimension is NAN x
NS*(number of coefficients). A convenient way to view the matrix is to assign
a 3-d dimension. I.e., if x
is the result of a call to this function
and there are NX coefficients in the model,
then dim(x) <- c(NAN,NS,NX)
makes a 3-d matrix with NAN rows, NS columns,
and NX pages. View the covariates for a single animal with x[3,,]
or similar
statement.
Names of variables in the model are returned as attribute "variables". Whether the model has an intercept is returned as attribute "intercept".
Trent McDonald, WEST-INC, tmcdonald@west-inc.com
F.cr.model.matrix
, tvar
, ivar
,
model.matrix
, eval
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.