Automatic Short Form Creation

Performs automatic creation of short forms of scales with an ant colony optimization algorithm and a Tabu search. As implemented in the package, the ant colony algorithm randomly selects items to build a model of a specified length, then updates the probability of item selection according to the fit of the best model within each set of searches. The algorithm continues until the same items are selected by multiple ants a given number of times in a row. On the other hand, the Tabu search changes one parameter at a time to be either free, constrained, or fixed while keeping track of the changes made and putting changes that result in worse fit in a "tabu" list so that the algorithm does not revisit them for some number of searches. See Leite, Huang, & Marcoulides (2008) for an applied example of the ant colony algorithm, and Marcoulides & Falk (2018) for an applied example of the Tabu search.


Package v0.4.2

Introduction of Function Classes

  • This version introduces classes to each of the main function outputs (antcolony.lavaan == "antcolony", simulatedAnnealing == "simulatedAnnealing", tabuShortForm == "tabu")
  • This will allow for plot and print methods for each of these functions

Broken functionality: antcolony_plot

  • The function antcolony_plot was replaced with plot.antcolony (aka, a plot method)

New functionality: S3 method for plotting

  • With the addition of classes, a plot method and accompanying documentation has been added.
  • Future updates will expand S3 methods for print() and summary()


  • Bugfixes to the main functions when using them to create shortforms of bifactor models.
  • They should now produce actual bifactor shortforms (in v0.4.1, sometimes the item names would be cut off in later iterations [FIXED] and the relationship between latent variables would be changed when they should have been kept constant [FIXED]).

Added a package loading message

  • Now, when using an interactive R session, a package message is printed out (with a little Penguin holding it all up)!

Package v0.4.1

New functionality: Simulated Annealing

  • The Simulated Annealing (SA) algorithm has been added to the package, with a single user-facing function simulatedAnnealing().
  • SA can be used on anything lavaan can run, though the current implementation focuses on traditional confirmatory models using lavaan::cfa(). However, there are plans for more user control in the modelling process to allow for other model defaults.

New functionality: Tabu Search (Short Form)

  • An adaptation of the Tabu search to short form creation has been added.

New functionality: ACO Plots

  • The antcolony_lavaan() function has been modified so that it no longer will print a summaryfile.txt. Rather, the function maintains the old summary file as an internal object and returns it after completion,
  • The new function antcolony_plot() takes the results from antcolony_lavaan() and creates three graphs: (a) a plot showing how pheremone levels change as the algorithm progresses, (b) a plot showing how the mean value of the regression coefficients changes as the algorithm progresses, and (c) a plot showing how the mean variance explained changes as the algorithm progresses.

New functionality: Bifactor Models

  • Each of the short form functions utilizing lavaan (antcolony.lavaan(), simulatedAnnealing(), tabuShortForm()) are capable of handling bifactor models.
  • In theory, this means relatively arbitrary models can be specified as well, but the functions utilize the "~" and "~~" operators for the additional functionality as well as the bifactor logical option. No guarantee that an arbitrary model will work beyond those currently tested.

Minor revisions

  • The lavaan-based functions all have more controlled output to the R console. This is most noticeable with the antcolony.lavaan() function.

Package v0.4.0

New functionality: Tabu Search

  • The Tabu search has been added to the package, with user-facing functions tabu.sem() and search.prep() for most of the heavy lifting and various helper and internal functions. The code was taken primarily from Carl Falk and Katerina Marcoulides (see Marcoulides, K. M., & Falk, C. F. (2018). Model Specification Searches in Structural Equation Modeling with R. Structural Equation Modeling: A Multidisciplinary Journal, 1-8.). These have been tested in limited circumstances, so please report any bugs as you find them!

Minor changes

  • created.
  • Description file updated.
  • Authorship has been updated and URLs have been added to the ant colony functions.
  • No bugs have been found in the package thus far, but just a reminder for any users that bug reports are helpful and welcome.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.4.2 by Anthony Raborn, 3 months ago

Report a bug at

Browse source code at

Authors: Anthony Raborn [aut, cre] , Walter Leite [aut]

Documentation:   PDF Manual  

LGPL (>= 2.0, < 3) | Mozilla Public License license

Imports lavaan, ggplot2, tidyr, stringr

Suggests knitr, MplusAutomation, rmarkdown

See at CRAN