-
Notifications
You must be signed in to change notification settings - Fork 2
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
pre-processing for mixture3p
and IMM
model fails if the setsize variable contains character information
#97
Comments
if we want to remove the letters from the labels we could use: |
good catch. I think best to keep it simply. Requere it to be either numeric, or coercible to numeric (digits as factors). I'll add that as a stop condition and test |
Wow, my bad, I recoded it that way to have nice facet labels in the plots, and since I never ran the mixture3p model, just wrote "it's the same as the 2p". That'll teach me! Anyway, positive thing at the end, because we can catch this behavior. |
Update: actually it wouldn't. It would just throw the same error you encountered. Not sure what I was referring to earlier, since the old code used
I'll even reference this issue in the dev-notes guide, as an example of why unit testing us super important. We have a lot of tests for check_data, but I purposefully ignored checking ss_numeric as it seemed super straightforward. We should always ask "can this go wrong without producing errors", rather than "is this a complicated enough to be worth testing" The most ironic part is that a couple of hours ago I used for the first time the test coverage tool described here (https://r-pkgs.org/testing-design.html#sec-testing-design-coverage). And I added tests for other things that were missing, but when I glanced over this line in red below, I thought "no point in testing that"! :) |
fixed by be789f6 |
When I tested the
mixture3p
model for the Vignette on the mixture models using the Bayes data set from themixtur
package, I noticed that the preprocessing and creating of the Index variables fails, because the variable is coded asSet Size 1
,Set Size 2
,Set Size 4
, andSet Size 6
.We should include a notification that the setsize variable should be coded either numerically, if it is entered as a continuous predictor, or with factor labels that only use single digits. Alternatively, we could see if we can remove all alphabet letters from the set size labels to only maintain the digit information. But this would also fail, if someone uses labels such as "one", "two", "three", etc. for coding a set size factor.
The text was updated successfully, but these errors were encountered: