| best_model | R Documentation |
Methods for the tseLCA_select object returned by tse_lca() with
several numbers of classes. best_model() returns the fitted model that
minimizes an information criterion; x[[k]] returns the k-class model.
best_model(object, ...)
## S3 method for class 'tseLCA_select'
best_model(object, criterion = c("BIC", "AIC", "SABIC"), ...)
## S3 method for class 'tseLCA_select'
x[[i, ...]]
## S3 method for class 'tseLCA_select'
as.data.frame(x, ...)
## S3 method for class 'tseLCA_select'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'tseLCA_select'
plot(x, which = c("AIC", "BIC", "SABIC"), ...)
... |
Further arguments passed to |
criterion |
Information criterion to minimize: |
x, object |
A |
i |
Number of classes of the model to extract. |
digits |
Number of significant digits to print. |
which |
Criteria to plot. |
best_model() and [[: a tseLCA_measurement object.
as.data.frame(): the enumeration table. print(), plot(): x,
invisibly.
d <- generate_data(500, "high", "covariate", seed = 1)
sel <- tse_lca(cbind(Y1, Y2, Y3, Y4, Y5, Y6) ~ 1, data = d, nclass = 1:4)
as.data.frame(sel)
best_model(sel)
sel[[2]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.