Skip to content

Conversation

@RussianImperialScott
Copy link

This PR fixes a bug during the step where the gnm() function determines which coefficients to constrain based on the arguments to the function call. The original code askes if(res == 0 && length(constrain) == 1), which seems to be testing for the situation where constrain is a character vector of length 1 but does not match any of the existing coefficient names. However, when two or more coefficients to constrain are specified, then the result of res == 0 has a length greater than 1, and this causes either a warning or error (depending on the version of R, it seems?) when matched with the scalar "AND" operator &&. By using identical(res, 0) instead, we get around this issue.

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

Successfully merging this pull request may close these issues.

1 participant