Skip to content

FCO

Flexible Cutoffs for Model Fit Evaluation in Covariance-Based Structural Models

v2.0.2 · Feb 25, 2026 · GPL (>= 3)

Description

A toolbox to derive flexible cutoffs for fit indices in 'Covariance-based Structural Equation Modeling' based on the paper by 'Niemand & Mai (2018)' <doi:10.1007/s11747-018-0602-9>. Flexible cutoffs are an alternative to fixed cutoffs - rules-of-thumb - regarding an appropriate cutoff for fit indices such as 'CFI' or 'SRMR'. It has been demonstrated that these flexible cutoffs perform better than fixed cutoffs in grey areas where misspecification is not easy to detect. The package provides an alternative to the tool at <https://flexiblecutoffs.org> as it allows to tailor flexible cutoffs to a given dataset and model, which is so far not available in the tool. The package simulates fit indices based on a given dataset and model and then estimates the flexible cutoffs. Some useful functions, e.g., to determine the 'GoF-' or 'BoF-nature' of a fit index, are provided. So far, additional options for a relative use (is a model better than another?) are provided in an exploratory manner.

Downloads

373

Last 30 days

10177th

11.9K

Last 90 days

83K

Last year

Trend: -67.7% (30d vs prior 30d)

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 ERROR
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (2 non-OK)
ERROR r-release-macos-arm64

examples

Running examples in ‘FCO-Ex.R’ failed
The error most likely occurred in:

> ### Name: flex_co
> ### Title: Obtain flexible cutoffs for one or two models
> ### Aliases: flex_co
> 
> ### ** Examples
> 
> #Note: Demonstration only! Please use higher numbers of replications for your applications (>= 500).
> #A single model to obtain fit indices for
> mod <- "
+ F1 =~ Q5 + Q7 + Q8
+ F2 =~ Q2 + Q4
+ F3 =~ Q10 + Q11 + Q12 + Q13 + Q18 + Q19 + Q20 + Q21 + Q22
+ F4 =~ Q1 + Q17
+ F5 =~ Q6 + Q14 + Q15 + Q16
+ "
> fits.single <- gen_fit(mod1 = mod, x = bb1992, rep = 10, standardized = FALSE)
Warning in pop_mod(mod = mod1, x = x, type = type, standardized = standardized) :
  All loadings are < 1. Consider revision of standardized.

 *** caught segfault ***
address 0x110, cause 'invalid permissions'

 *** caught segfault ***
address 0x110, cause 'invalid permissions'

Traceback:
 1: lav_samplestats_Gamma(Y = Y, x.idx = x.idx[[g]], cluster.idx = cluster.idx,     fixed.x = fixed.x, conditional.x = cond
...[truncated]...
visible(structure(msg, class = "try-error", condition = e))})
20: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
21: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
22: FUN(X[[i]], ...)
23: lapply(seq_len(cores), inner.do)
24: parallel::mclapply(1:rep, function(r) {    generator(x = x, n = n, seed = seeds[r], mode = mode, pop.mod1 = pop.mod,         free1 = free, s = s, k = k, nf = nf)}, mc.cores = cores)
25: gen_fit(mod1 = mod, x = bb1992, rep = 10, standardized = FALSE)
An irrecoverable exception occurred. R is aborting now ...
Warning in parallel::mclapply(1:rep, function(r) { :
  scheduled cores 1, 2 did not deliver results, all values of the jobs will be affected
> flex_co(fits = fits.single, index = c("CFI", "SRMR"))
Warning in flex_co(fits = fits.single, index = c("CFI", "SRMR")) :
  The number of replications is lower than the recommended minimum of 500. Consider with care.
Error in fits.nna[[1]] : subscript out of bounds
Calls: flex_co -> %in%
Execution halted
ERROR r-release-macos-arm64

tests

Running ‘testthat.R’ [9s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(FCO)
  > 
  > test_check("FCO")
  This is lavaan 0.6-21
  lavaan is FREE software! Please report any bugs.
  
   *** caught segfault ***
  address 0x110, cause 'invalid permissions'
  
   *** caught segfault ***
  address 0x110, cause 'invalid permissions'
  
  Traceback:
   1: lav_samplestats_Gamma(Y = Y, x.idx = x.idx[[g]], cluster.idx = cluster.idx,     fixed.x = fixed.x, conditional.x = conditional.x, meanstructure = meanstructure,     slopestructure = conditional.x, gamma.n.minus.one = lavoptions$gamma.n.minus.one,     unbiased = lavoptions$gamma.unbiased, Mplus.WLS = FALSE)
   2: lav_samplestats_from_data(lavdata = lavdata, lavoptions = lavoptions,     WLS.V = WLS.V, NACOV = NACOV)
   3: lav_lavaan_step05_samplestats(slotSampleStats = slotSampleStats,     lavdata = lavdata, lavoptions = lavoptions, WLS.V = WLS.V,     NACOV = NACOV, sample.cov = sample.co
...[truncated]...
─ Error ('test-recommend_dv.R:57:13'): Is the proper dv technique used? constraining? ──
  Error in `recommend_dv(fits = fits.dv.con, )`: Only dual model fit indices are supported so far for this function. Please revise or use flex_co.
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(recommend_dv(fits = fits.dv.con, )) at test-recommend_dv.R:57:13
   2. │ └─base::withCallingHandlers(...)
   3. └─FCO::recommend_dv(fits = fits.dv.con, )
  ── Error ('test-recommend_dv.R:65:13'): Is the result rounded properly? ────────
  Error in `recommend_dv(fits = fits.dv.con, digits = 5)`: Only dual model fit indices are supported so far for this function. Please revise or use flex_co.
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(recommend_dv(fits = fits.dv.con, digits = 5)) at test-recommend_dv.R:65:13
   2. │ └─base::withCallingHandlers(...)
   3. └─FCO::recommend_dv(fits = fits.dv.con, digits = 5)
  
  [ FAIL 14 | WARN 25 | SKIP 0 | PASS 55 ]
  Error:
  ! Test failures.
  Execution halted

Check History

ERROR 12 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 10, 2026
ERROR r-devel-macos-arm64

examples

Running examples in ‘FCO-Ex.R’ failed
The error most likely occurred in:

> ### Name: flex_co
> ### Title: Obtain flexible cutoffs for one or two models
> ### Aliases: flex_co
> 
> ### ** Examples
> 
> #Note: Demonstration only! Please use higher num
...[truncated]...
Warning in flex_co(fits = fits.single, index = c("CFI", "SRMR")) :
  The number of replications is lower than the recommended minimum of 500. Consider with care.
Error in fits.nna[[1]] : subscript out of bounds
Calls: flex_co -> %in%
Execution halted
ERROR r-release-macos-arm64

examples

Running examples in ‘FCO-Ex.R’ failed
The error most likely occurred in:

> ### Name: flex_co
> ### Title: Obtain flexible cutoffs for one or two models
> ### Aliases: flex_co
> 
> ### ** Examples
> 
> #Note: Demonstration only! Please use higher num
...[truncated]...
Warning in flex_co(fits = fits.single, index = c("CFI", "SRMR")) :
  The number of replications is lower than the recommended minimum of 500. Consider with care.
Error in fits.nna[[1]] : subscript out of bounds
Calls: flex_co -> %in%
Execution halted

Dependency Network

Dependencies Reverse dependencies checkmate cutpointr data.table doParallel dplyr foreach ggplot2 lavaan overlapping PoisBinOrdNor psych rcompanion simstandard stringr tidyr FCO

Version History

new 2.0.2 Mar 10, 2026
updated 2.0.2 ← 2.0.1 diff Feb 25, 2026
updated 2.0.1 ← 2.0.0 diff Feb 12, 2026
updated 2.0.0 ← 0.8.0 diff Sep 24, 2025
updated 0.8.0 ← 0.7.2 diff Mar 16, 2023
new 0.7.2 Feb 10, 2022