lvnetLasso: LASSO model selection

Description Usage Arguments Author(s) Examples

Description

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.

Usage

1
2
3
4
lvnetLasso(data, lassoMatrix, lassoTol = 1e-04, nTuning = 20, 
  tuning.min = 0.01, tuning.max = 0.5, criterion = c("bic", "aic", 
  "ebic"), verbose = TRUE, refitFinal = TRUE, refitAll = FALSE, 
  nCores = 1, ...)

Arguments

data

The data argument as used in lvnet

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 lvnet

Author(s)

Sacha Epskamp <mail@sachaepskamp.com>

Examples

 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)

lvnet documentation built on June 21, 2019, 9:06 a.m.

Related to lvnetLasso in lvnet...