buildmodel {SparseMSE} | R Documentation |
Build model for multiple systems estimation
Description
For multiple systems estimation model corresponding to a specified set of two-list effects, set up the GLM model formula and data matrix.
Usage
buildmodel(zdat, mX)
Arguments
zdat |
Data matrix with |
mX |
A |
Value
A list with components as below.
datamatrix
A matrix with all possible capture histories, other than those equal to or containing non-overlapping pairs
indexed by parameters
that are within the model specified by mX
. A non-overlapping pair is a pair of lists (i,j)
such that
no case is observed in both lists,
regardless of whether it is present on any other lists. If (i,j)
is within the model specified by mX
,
all capture histories containing both i
and j
are
then excluded.
modelform
The model formula suitable to be called by the Generalized Linear Model function glm
. Model terms corresponding to
non-overlapping pairs are not included, because they are handled by removing appropriate rows from the data matrix supplied to glm. The list
of non-overlapping pairs are provided in emptyoverlaps
. See Chan, Silverman and Vincent (2019) for details.
emptyoverlaps
A matrix with two rows, whose columns give the indices of non-overlapping pairs of lists where the parameter indexed by
the pair is within the specified model. The column names give the names of the lists
corresponding to each pair.
References
Chan, L., Silverman, B. W., and Vincent, K. (2019). Multiple Systems Estimation for Sparse Capture Data: Inferential Challenges when there are Non-Overlapping Lists. Available from https://arxiv.org/abs/1902.05156.
Examples
data(NewOrl)
buildmodel(NewOrl, mX=NULL)
#Build a matrix that contains all two-list effects
m=dim(Artificial_3)[2]-1
mX = t(expand.grid(1:m, 1:m)); mX = mX[ , mX[1,]<mX[2,]]
# With one two-list effect
buildmodel(NewOrl, mX=mX[,1])
#With three two-list effects
buildmodel(NewOrl, mX=mX[,1:3])