lnccbrown / HSSM

Development of HSSM package
Other
70 stars 10 forks source link

Allow users to specify the number of choices #430

Closed digicosmos86 closed 1 month ago

digicosmos86 commented 1 month ago

We previously inferred n_choices from the number of unique responses from the user's data. This might have worked in the binary case, but in multiple-choice cases, some responses might be legitimately missing from some datasets. This PR adds a choices option that could be either an int or a list of ints to allow users to specify the number of choices. The data sanity check from this option is more robust. It will raise an error when data is miscoded and raise a warning to remind the users when certain values are missing from their dataset.

Also closes #429