Skip to content

Error using ichol: Encountered nonpositive pivot #17

@economoser

Description

@economoser

First of all, thank you so much for the fantastic work and sharing this with the community!

I’ve noticed that sometimes in one of the iterations the infamous "Error using ichol": "Encountered nonpositive pivot" can occur when computing the incomplete Cholesky factorization of the Gramian matrix as a preconditioner for matrix inversion in the estimation. For example, I believe this can happen in the call to the ichol function that occurs six lines after the comment "%%Deresidualized [...]" in version 2.1 of leave_out_COMPLETE.m. I believe -- TBC! -- I have also seen it occur later on in the code during another call to the same ichol function.

When this error occurs, then currently the whole run is aborted. I wonder if there’s a way to -try- and -catch- that error or otherwise find some workaround that lets you still use the information obtained during the previous code evaluations? For example, when there are many calls to ichol during the random projection iterations, could a failed iteration be replaced with another one? This would be a marvelous feature as sometimes the routine runs for a couple days before hitting an error.

NB: I am sure that my design matrix (X in y = X*beta + e) is not singular, i.e., I have dropped the necessary indicators and other covariates to avoid multicollinearity in controls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions