| add_M2 | R Documentation |
Computes M2 for the model and for the independence baseline, and
returns the fitted object with a TestFitIndicesM2 component added. The
print method then shows the response-pattern indices and the margin-based ones
side by side.
This is a separate step rather than part of the fit because it is expensive:
the cost is the Cholesky factorisation of a dense matrix whose size grows with
the square of the item count (see M2).
add_M2(x, ...)
## Default S3 method:
add_M2(x, ...)
## S3 method for class 'nominalLCA'
add_M2(x, verbose = TRUE, gc = TRUE, ...)
## S3 method for class 'ratedLCA'
add_M2(x, verbose = TRUE, gc = TRUE, ...)
## S3 method for class 'LRAordinal'
add_M2(x, verbose = TRUE, gc = TRUE, ...)
## S3 method for class 'ordinalBiclustering'
add_M2(x, verbose = TRUE, gc = TRUE, ...)
## S3 method for class 'nominalBiclustering'
add_M2(x, verbose = TRUE, gc = TRUE, ...)
x |
A fitted model object of class "exametrika". |
... |
Additional arguments passed to methods. |
verbose |
Logical; if TRUE (default), reports the size of the margin covariance matrix before computing it when that matrix is large. |
gc |
Logical; if TRUE (default), releases the workspace before
returning. See |
The fitted object with TestFitIndicesM2 added.
dat <- dataFormat(J20S600, response.type = "nominal")
fit <- LCA(dat, ncls = 3)
fit <- add_M2(fit)
fit
print(fit, fit_indices = "margin")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.