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

potentially improve warning/error messages #393

Open
clarkliming opened this issue Dec 19, 2023 · 2 comments
Open

potentially improve warning/error messages #393

clarkliming opened this issue Dec 19, 2023 · 2 comments

Comments

@clarkliming
Copy link
Collaborator

related to #387 but still a little different

in some scenarios the variance estimate is 0 if the values match so well to the fixed effect, leading to a incorrect hessian/gradient

see the following example

fit <- mmrm(FEV1 ~ RACE + SEX + ar1(AVISIT | USUBJID), data = fev_data)

fev_data$FEV1[!is.na(fev_data$FEV1)] <- fitted(fit)

mmrm(FEV1 ~ RACE + SEX + ar1(AVISIT | USUBJID), data = fev_data)

we might improve this error messages to be clearer

@danielinteractive
Copy link
Collaborator

@clarkliming What would be the approach here? E.g. can you define the condition for a better error message based on a 0 or almost 0 variance estimate?

@clarkliming
Copy link
Collaborator Author

probably in defining the objective, checks the values of sd and if they are smaller than a specific value (like log(1e-16)) we then raise an error with suitable message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants