ci_bound_wn_i {semlbci} | R Documentation |
Likelihood-based Confidence Bound By Wu-Neale-2012
Description
User the method proposed by Wu and Neale
(2012) to find the lower or upper bound of the likelihood-based
confidence interval (LBCI) for one parameter in a structural
equation model fitted in lavaan::lavaan()
.
Usage
ci_bound_wn_i(
i = NULL,
npar = NULL,
sem_out = NULL,
f_constr = NULL,
which = NULL,
history = FALSE,
perturbation_factor = 0.9,
lb_var = -Inf,
standardized = FALSE,
wald_ci_start = !standardized,
opts = list(),
ciperc = 0.95,
ci_limit_ratio_tol = 1.5,
verbose = FALSE,
sf = 1,
sf2 = 0,
p_tol = 5e-04,
std_method = "internal",
bounds = "none",
xtol_rel_factor = 1,
ftol_rel_factor = 1,
lb_prop = 0.05,
lb_se_k = 3,
try_harder = 0,
fit_lb = -Inf,
fit_ub = +Inf,
timeout = 300,
...
)
Arguments
i |
The position of the target parameter as appeared in the
parameter table of an lavaan object, generated by
|
npar |
The number of free parameters, including those constrained to be equal. |
sem_out |
The fit object. Currently supports lavaan::lavaan objects only. |
f_constr |
The constraint function generated by
|
which |
Whether the lower bound or the upper bound is to be
found. Must be |
history |
Not used. Kept for backward compatibility. |
perturbation_factor |
A number multiplied to the parameter
estimates in |
lb_var |
The lower bound for free parameters that are
variances. If equal to |
standardized |
If |
wald_ci_start |
If |
opts |
Options to be passed to |
ciperc |
The intended coverage probability for the confidence interval. Default is .95, and the bound for a 95% confidence interval will be sought. |
ci_limit_ratio_tol |
The tolerance for the ratio of |
verbose |
If |
sf |
A scaling factor. Used for robust confidence bounds.
Default is 1. Computed by an internal function called by
|
sf2 |
A shift factor. Used for robust confidence bounds.
Default is 0. Computed by an internal function called by
|
p_tol |
Tolerance for checking the achieved level of
confidence. If the absolute difference between the achieved level
and |
std_method |
The method used to find the standardized
solution. If equal to |
bounds |
Default is |
xtol_rel_factor |
Multiply the default |
ftol_rel_factor |
Multiply the default |
lb_prop |
Used by an internal function to set the lower bound
for free variances. Default is .05, setting the lower bound to
.05 * estimate. Used only if the lower bound set by |
lb_se_k |
Used by an internal function to set the lower bound
for free variances. Default is 3, the estimate minus 3 standard
error. If negative, the lower bound is set using |
try_harder |
If error occurred in the optimization, how many more times to try. In each new attempt, the starting values will be randomly jittered. Default is 0. |
fit_lb |
The vector of lower
bounds of parameters. Default is
|
fit_ub |
The vector of upper
bounds of parameters. Default is
|
timeout |
The approximate maximum time for the search, in second. Default is 300 seconds (5 minutes). |
... |
Optional arguments. Not used. |
Details
Important Notice
This function is not supposed to be used directly by users in
typical scenarios. Its interface is user-unfriendly because it
should be used through semlbci()
. It is exported such that
interested users can examine how a confidence bound is found, or
use it for experiments or simulations.
Usage
This function is the lowest level function used by semlbci()
.
semlbci()
calls this function once for each bound of each
parameter. To use it, set_constraint()
needs to be called first
to create the equality constraint required by the algorithm
proposed by Wu and Neale (2012).
Algorithm
This function implements the algorithm presented in Wu and Neale (2012; see also Pek & Wu, 2015, Equation 12) that estimates all free parameters in the optimization.
Limitation(s)
This function does not yet implement the method by Wu and Neale (2012) for an estimate close to an attainable bound.
Value
A cibound
-class object which is a list with three elements:
-
bound
: A single number. The value of the bound located.NA
is the search failed for various reasons. -
diag
: A list of diagnostic information. -
call
: The original call.
A detailed and organized output can be printed by the default print
method (print.cibound()
).
References
Pek, J., & Wu, H. (2015). Profile likelihood-based confidence intervals and regions for structural equation models. Psychometrika, 80(4), 1123-1145. doi: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. doi:10.1007/s10519-012-9560-z
See Also
print.cibound()
, semlbci()
, ci_i_one()
Examples
data(simple_med)
dat <- simple_med
mod <-
"
m ~ x
y ~ m
"
fit_med <- lavaan::sem(mod, simple_med, fixed.x = FALSE)
fn_constr0 <- set_constraint(fit_med)
out1l <- ci_bound_wn_i(i = 1,
npar = 5,
sem_out = fit_med,
f_constr = fn_constr0,
which = "lbound")
out1l