I'm running into a singularity issue when I run get_lambda_max(). The line producing the error is when get_lambdamax tries to invert the matrix: solve(mat, c(t(x) %*% y, rep(0, m))). Specifically, X is a matrix of Covid case counts where each successive row and column indicates a later date, so $X{i,j} = X{i+1,j+1} = X{i+2,j+2} = \ldots$.
Given this symmetry, it stands to reason that X might be singular. However, it would be helpful for get_lambda_max() to have a crude workaround, e.g. adding small noise to the diagonal entries.
I'm running into a singularity issue when I run get_lambda_max(). The line producing the error is when get_lambdamax tries to invert the matrix:
solve(mat, c(t(x) %*% y, rep(0, m)))
. Specifically, X is a matrix of Covid case counts where each successive row and column indicates a later date, so $X{i,j} = X{i+1,j+1} = X{i+2,j+2} = \ldots$. Given this symmetry, it stands to reason that X might be singular. However, it would be helpful for get_lambda_max() to have a crude workaround, e.g. adding small noise to the diagonal entries.