While trying to replicate this function, I noticed two cases which might cause issues:
Correct me if I am wrong, but it is not clear if defining a variable using the T letter (same as the abbreviation for TRUE) would pose problems later on as T variable is heavily used in the calculation. Maybe rename it to NR?
lambdas.cleaned <- c(val, rep(1, M))
lambdas.cleaned <- c(val, rep(0, M))
maybe cause problems on the handle of output (e.g. in a temporal setting), as they give consistently different lengths of eigenvalue vector. Maybe something like:
lambdas.cleaned <- c(val, rep(1, M-length(val)))
would be more preferred?
While trying to replicate this function, I noticed two cases which might cause issues:
Correct me if I am wrong, but it is not clear if defining a variable using the T letter (same as the abbreviation for TRUE) would pose problems later on as T variable is heavily used in the calculation. Maybe rename it to NR?
maybe cause problems on the handle of output (e.g. in a temporal setting), as they give consistently different lengths of eigenvalue vector. Maybe something like:
would be more preferred?