lc: Fit latent-class MPT models

Description Usage Arguments References

View source: R/lc.R

Description

This function estimates one or more latent-class MPT models. Starting from a one-class solution, it increments the number of latent classes until a criterion is met.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
lc(
  model_file,
  data_file,
  classes = NULL,
  max_classes = 20,
  runs = 20,
  fisher_information = "expected",
  montecarlo_samples = 1e+05,
  crit = "AIC",
  verbose = FALSE,
  keep_files = FALSE
)

Arguments

model_file

Character. File path to an .eqn file

data_file

Character. File path to a data file

classes, max_classes

The number of classes for a single model or the maximum number of classes. To estimate a single model, specify classes; to estimate multiple models with increasing number of classes, specify max_classes.

runs

Integer. Number of optimization runs.

fisher_information

The type of Fisher Information to be computed. Can be either expected, montecarlo, observed, or none. Defaults to expected. However, if expected Fisher Information cannot be computed, the Monte Carlo method is used.

montecarlo_samples

The number of simulations to be used for Monte Carlo Fisher Information. Defaults to 1e5.

crit

If multiple models with an increasing number of classes are to be estimated, use this criterion to stop estimating more complex models. Can be one of "AIC", "BIC", or "BIC2".

verbose

Logical. Indicating whether an announcement is printed on the console when fitting of a new model starts.

keep_files

Logical. Should temporary files be retained?

References

Stahl, C., & Klauer, K.C. (2007). HMMTree: A computer program for hierarchical multinomial processing tree models. Behavior Research Methods, 39, 267-273.


methexp/HMMTreeR documentation built on Nov. 11, 2021, 7:31 p.m.