the above lines do not return sub_lam (i.e., sub_lam will be numeric(0)), and subsequent codes will not work properly. This happened some of my datasets.
I would be willing to start on a PR if maintainers support the idea. I would also appreciate if you could implement a more efficient way to search lambda values.
When BIC (or AIC) don't change for given lambda values (like below),
https://github.com/gordy2x/ecoCopula/blob/277ab698a00a90852d75e724890c74deb52c2a29/R/cgr.R#L101-L108
the above lines do not return
sub_lam
(i.e.,sub_lam
will be numeric(0)), and subsequent codes will not work properly. This happened some of my datasets.Currently, I put large lambda values and make completely sparse matrices (identity matrix) for those bad estimates. Because most of the case, the target matrix become completely sparse at the beginning of changing lambda. https://github.com/mattocci27/ecoCopula/blob/4439a2f1575bcd486b641a9562780a9445932bee/R/cgr.R#L113-L116
I would be willing to start on a PR if maintainers support the idea. I would also appreciate if you could implement a more efficient way to search lambda values.