buildmodelmatrix {SparseMSE} | R Documentation |
Build the model matrix based on particular data, as required to check for identifiability and existence of the maximum likelihood estimate
Description
This routine builds a model matrix as required by the linear program check checkident
and checks if the matrix is of full rank.
In addition, for each individual list, and for each pair of lists included in the model,
it returns the total count of individuals appearing on the specific list or lists whether or not in combination with other lists.
Usage
buildmodelmatrix(zdat, mX = NULL)
Arguments
zdat |
Data matrix with |
mX |
A |
Value
A list with components as below
modmat
The matrix that maps the parameters in the model (excluding any corresponding to non-overlapping lists) to the log expected value
of the counts of capture histories that do not contain non-overlapping pairs in the data.
tvec
A vector indexed by the parameters in the model, excluding those corresponding to non-overlapping pairs of lists. For each parameter
the vector contains the total count of individuals in all the capture histories that include both the lists indexed by that parameter.
rankdef
The column rank deficiency of the matrix modmat
. If rankdef = 0
, the matrix has full column rank.
Examples
data(NewOrl)
buildmodelmatrix(NewOrl, mX=NULL)