Learn R Programming

(Version 0.11.5, updated on 2025-12-05 release history)

semlbci

This package includes functions for forming the likelihood-based confidence intervals (LBCIs) for parameters in structural equation modeling. It also supports the robust LBCI proposed by Falk (2018). It was described in the following manuscript:

  • Cheung, S. F., & Pesigan, I. J. A. (2023). semlbci:

An R package for forming likelihood-based confidence intervals for parameter estimates, correlations, indirect effects, and other derived parameters. Structural Equation Modeling: A Multidisciplinary Journal. 30(6), 985--999. https://doi.org/10.1080/10705511.2023.2183860

As argued in the article and by others, LBCI is usually better than Wald-based confidence interval and delta method confidence interval, which are the default method in most structural equation modeling (SEM) program. However, there is one technical disadvantage: LBCI cannot be directly computed but needs to be "found" (searched) by some algorithms. Wald CIs, on the other hand, can be computed quickly.

In semlbci, we try to address this disadvantage of LBCI by implementing an efficient method (illustrated by Pek & Wu, 2018, adapted from Wu & Neale, 2012), to help researchers to form LBCIs for model parameters, including user-defined parameters, in models fitted by lavaan. It can also form LBCIs for the standardized solution, such as "betas" (standardized regression coefficients) and correlations, and support multiple-group models. Last, it supports the robust LBCI proposed by Falk (2018) for nonnormal variables.

More information on this package can be found below:

https://sfcheung.github.io/semlbci/

How To Use It

Illustration with examples can be found in the Get Started guide (vignette("semlbci", package = "semlbci")).

Installation

The stable CRAN version can be installed by install.packages():

install.packages("semlbci")

The latest version at GitHub can be installed by remotes::install_github():

remotes::install_github("sfcheung/semlbci")

Implementation

It currently implements the algorithm illustrated by Pek and Wu (2018), adapted from Wu and Neale (2012) without adjustment for parameters with attainable bounds. It also supports the robust LBCI proposed by Falk (2018). More on the implementation can be found in the technical appendices.

References

Cheung, S. F., & Pesigan, I. J. A. (2023). semlbci: An R package for forming likelihood-based confidence intervals for parameter estimates, correlations, indirect effects, and other derived parameters. Structural Equation Modeling: A Multidisciplinary Journal. 30(6), 985--999. https://doi.org/10.1080/10705511.2023.2183860

Falk, C. F. (2018). Are robust standard errors the best approach for interval estimation with nonnormal data in structural equation modeling? Structural Equation Modeling: A Multidisciplinary Journal, 25(2), 244-266. https://doi.org/10.1080/10705511.2017.1367254

Pek, J., & Wu, H. (2015). Profile likelihood-based confidence intervals and regions for structural equation models. Psychometrika, 80(4), 1123-1145. https://doi.org/10.1007/s11336-015-9461-1

Wu, H., & Neale, M. C. (2012). Adjusted confidence intervals for a bounded parameter. Behavior Genetics, 42(6), 886-898. https://doi.org/10.1007/s10519-012-9560-z

Issues

If you have any suggestions or found any bugs or limitations, please feel feel to open a GitHub issue. Thanks.

https://github.com/sfcheung/semlbci/issues

Copy Link

Version

Install

install.packages('semlbci')

Monthly Downloads

221

Version

0.11.5

License

GPL-3

Maintainer

Shu Fai Cheung

Last Published

December 6th, 2025

Functions in semlbci (0.11.5)

mediation_latent_skewed

Dataset (SEM, Three Factors, Nine Variables, Mediation, Skewed)
gen_userp

Create a Wrapper To Be Used in 'lavaan' Models
get_cibound

A 'cibound' Output From a 'semlbci' Object
plot.loglike_compare

Plot the Output of 'loglike_compare()'
loglike_compare

Log Profile likelihood of a Parameter
print.semlbci

Print Method of a 'semlbci' Object
print.cibound

Print Method of a 'cibound'-class Object
nearby_levels

LBCI Bounds of Nearby Levels of Confidence
reg_cor_near_one

Dataset (Six Variables, One Correlation Close to One)
semlbci

Likelihood-Based Confidence Interval
semlbci-package

semlbci: Likelihood-Based Confidence Interval in Structural Equation Models
syntax_to_i

Parameter Positions From lavaan Syntax
simple_med

Dataset (Simple Mediation Model)
set_constraint

Equality Constraint for Finding the LBCI by Wu-Neale-2012
simple_med_mg

Dataset (Simple Mediation Model, Two Groups)
mediation_latent

Dataset (SEM, Three Factors, Nine Variables, Mediation)
cfa_two_factors_mg

Dataset (CFA, Two Factors, Six Variables, Two Groups)
cfa_evar_near_zero

Dataset (CFA, Two Factors, One Standardized Error Variance Close to Zero)
ci_bound_wn_i

Likelihood-based Confidence Bound By Wu-Neale-2012
confint.semlbci

Confidence Intervals for a 'smelbci' Object
ci_i_one

Likelihood-Based Confidence Bound for One Parameter
ci_order

Check The Order of Bounds in a List of semlbci Objects
check_sem_out

Pre-analysis Check For 'semlbci'
ci_bound_ur

Find a Likelihood-Based Confidence Bound By Root Finding
ci_bound_ur_i

Likelihood-Based Confidence Bound By Root Finding
cfa_two_factors

Dataset (CFA, Two Factors, Six Variables)