Description Usage Arguments Author(s) Examples
This function runs lvnet
for a number of different tuning parameters, selects the best model based on some criterion and refits that model to obtain accurate parameter estimates. The lassoSelect
function can afterwards be used to select a different model.
1 2 3 4 |
data |
The data argument as used in |
lassoMatrix |
Vector indicating the matrix or matrices to use in LASSO optmimization |
lassoTol |
Tolerance for absolute values to be treated as zero in counting parameters. |
nTuning |
Number of tuning parameters to estimate. |
tuning.min |
Minimal tuning parameter |
tuning.max |
Maximal tuning parameter |
criterion |
Criterion to use in model selection |
verbose |
Should progress be printed to the console? |
refitFinal |
Logical, should the best fitting model be refitted without LASSO regularization? |
refitAll |
Logical, should *all* models be refitted without LASSO regularization (but with zeroes constrained) before evaluating fit criterium? |
nCores |
Number of cores to use in parallel computing. |
... |
Arguments sent to |
Sacha Epskamp <mail@sachaepskamp.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Load dataset:
library("lavaan")
data(HolzingerSwineford1939)
Data <- HolzingerSwineford1939[,7:15]
# Measurement model:
Lambda <- matrix(0, 9, 3)
Lambda[1:3,1] <- NA
Lambda[4:6,2] <- NA
Lambda[7:9,3] <- NA
# Search best fitting omega_theta:
## Not run:
res <- lvnetLasso(Data, "omega_theta", lambda = Lambda)
res$best
summary(res)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.