Skip to content

Conversation

@nicolasJouvin
Copy link
Contributor

This MR proposes to solve #156 by improving error message.

I propose to use lm.fit(log(Y) ~ X, singular.ok=FALSE) in compute_PLN_starting_point. This causes a traceable R error instead of an error in the C++ optimization routine when trying to invert $M M^\top$

I also wrote two tests for singular model matrix with continuous and discrete covariates. I only updated the documentation of compute_PLN_starting_point.

In this commit
 1. Use singular.ok=FALSE in lm.fit(log(Y) ~ X) which causes a traceable R error
 2. Update documentation.
 3. Write tests.
@mahendra-mariadassou mahendra-mariadassou merged commit 6d507d4 into PLN-team:master Nov 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PLN error message with singular model matrix is obscure

2 participants