Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No warnings for collinear effects #9

Open
certara-mtomashevskiy opened this issue Dec 19, 2023 · 0 comments
Open

No warnings for collinear effects #9

certara-mtomashevskiy opened this issue Dec 19, 2023 · 0 comments

Comments

@certara-mtomashevskiy
Copy link
Collaborator

Dear Helmut!
I think it would be good to add some warnings about matrix rank deficiency to cope the cases when the user's input is not correct

library(replicateBE)
rds01$treatment <- as.factor(sapply(as.character(rds01$period), switch, `1` = "R", `2` = "R", `3` = "T", `4` = "T"))
method.A(data = rds01)
#Error in if (round(res$"CL.lo(%)", 2) >= 100 * ret$BE1 & round(res$"CL.hi(%)",  : 
#missing value where TRUE/FALSE needed`

method.B(data = rds01)
# Error in MEEM(object, conLin, control$niterEM) : 
# Singularity in backsolve at level 0, block 1

method.B(data = rds01, option = 3)
fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
#Error in EMA.B$coefficients["treatmentT", "Estimate"] : 
#  subscript out of bounds
``` 
lm() does not inform about any collinear effects, I think it is better to use 'singular.ok = TRUE' and transform the error to the warning
lme() is also not polite in the error, but we can add more informative error, suggesting to check the data for collinear effects and typos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant