nearby_levels {semlbci} | R Documentation |
LBCI Bounds of Nearby Levels of Confidence
Description
Find LBCIs with levels of confidence
different from those stored in a semlbci
- class
object.
Usage
nearby_levels(x, ciperc_levels = c(-0.025, 0.025), ciperc_range = c(0.6, 0.99))
Arguments
x |
The output of |
ciperc_levels |
A numeric vector of deviations
from the original level of confidence. The default
is |
ciperc_range |
A numeric vector of two numbers,
which are the minimum and maximum levels of confidence
to be used, respectively. Default is |
Details
It receives a semlbci
-class object, gets
the original level of confidence, generates one or
more levels of confidence different from this level
by certain amounts, and repeats the original call
to semlbci()
with these levels of confidence.
The results are returned as a list of class
semlbci_list
, with the originalsemlbci
-class
included.
Value
A semlbci_list
-class object, which is
simply a named list of semlbci
-class object,
names being the levels of confidence.
Author(s)
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
See Also
Examples
library(lavaan)
mod <-
"
m ~ x
y ~ m
"
fit_med <- sem(mod, simple_med, fixed.x = FALSE)
lbci_fit <- semlbci(fit_med)
lbci_fit_nb <- nearby_levels(lbci_fit,
ciperc_levels = c(-.050, .050))
names(lbci_fit_nb)
# Check the order of the confidence bounds.
# A confidence interval with a higher level of confidence
# should enclose a confidence interval with
# a lower level of confidence.
ci_order(lbci_fit_nb)