View source: R/nearby_levels.R
nearby_levels | R Documentation |
Find LBCIs with levels of confidence
different from those stored in a semlbci
- class
object.
nearby_levels(x, ciperc_levels = c(-0.025, 0.025), ciperc_range = c(0.6, 0.99))
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 |
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.
A semlbci_list
-class object, which is
simply a named list of semlbci
-class object,
names being the levels of confidence.
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
semlbci()
, ci_order()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.