Hello,
Apologies if I missed this or was making an error in this space, but I kept running into an error when trying to get this code (from either the original article, or the uploaded version here) to run. When I run--
fit.reg.tune=cv_regsem(fit.delta,type="lasso",pars_pen=c(2:13),jump=0.01,multi.iter=4,mult.start=TRUE,lambda.start=0,n.lambda=50,tol=1e-6,fit.ret=c("BIC"),fit.ret2="train",optMethod="coord_desc",gradFun="ram",warm.start=T,full=TRUE)
I get out the following error--
Error: $ operator is invalid for atomic vectors
Here's my R sessionInfo() for reference--
----
> sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] regsem_1.6.2 Rsolnp_1.16 Rcpp_1.0.6 lavaan_0.6-8 ISLR_1.2
loaded via a namespace (and not attached):
[1] compiler_4.0.4 parallel_4.0.4 tools_4.0.4 tmvnsim_1.0-2 mnormt_2.0.2 pbivnorm_0.6.0
[7] truncnorm_1.0-8 stats4_4.0.4
-----
Have others run into this issue? Is there an attached library that's causing the problem?
Any thoughts are much appreciated!
(Of note, all the other commands/inputs are the same from Serang et al. 2017 paper) .
All the best,
Jamie.