This function is called from fit.mpt
to obtain the FIA, but can also be called independently.
It performs the following steps:
1.) Equality restrictions (if present) are applied to the model.
2.) The representation of the model as equations is transformed to the string representation of the model into the context-free language of MPT models (L-BMPT; Purdy & Batchelder, 2009). For this step to be successful it is absolutely necessary that the equations representing the model perfectly map the tree structure of the MPT. That is, the model file is only allowed to contain parameters, their negations (e.g., Dn
and (1 - Dn)
) and the operators + and *, but nothing else. Simplifications of the equations will seriously distort this step. This step is achieved by calling make.mpt.cf
.
Note that inequality restrictions are not included in this transformation.
3.) The context free representation of the model is then fed into the MCMC function computing the FIA (the port of BMPTFIA provided by Wu, Myung, & Batchelder, 2010; see bmpt.fia
).
If inequality restrictions are present, these are specified in the call to bmpt.fia
.
For multi-individual data sets (i.e., data
is a matrix
or data.frame
), get.mpt.fia
tries to minimize computation time. That is done by comparing the ratios of the number items between trees. To not run into problems related to floating point precision, these values are rounded to round.digit
. Then, get.mpt.fia
will only call bmpt.fia
as many times as there are differing ratios. As a consequence, the final penalty factor for FIA (CFIA
) is calculated by get.mpt.fia
, without providing confidence intervals for the penalty factor.