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

cluster_gen() fails if both cat_prop and rho are set #51

Open
wleoncio opened this issue Sep 10, 2024 · 1 comment
Open

cluster_gen() fails if both cat_prop and rho are set #51

wleoncio opened this issue Sep 10, 2024 · 1 comment
Assignees
Labels

Comments

@wleoncio
Copy link
Collaborator

MRE

cluster_gen(n = c(5, 2), n_X = 2, n_W = 2, cat_prop = list(c(0.5, 1), c(0.5, 1))) # OK
cluster_gen(n = c(5, 2), n_X = 2, n_W = 2, cat_prop = list(c(0.5, 1), c(0.5, 1)), rho = 0.5) # Fails 

Fixing this might be as simple as adding an else statement here, but the issue should be investigated further for side effects.

@wleoncio wleoncio added the bug label Sep 10, 2024
@wleoncio wleoncio self-assigned this Sep 10, 2024
wleoncio added a commit that referenced this issue Sep 10, 2024
wleoncio added a commit that referenced this issue Sep 10, 2024
wleoncio added a commit that referenced this issue Sep 10, 2024
* issue-51:
  Updated NEWS.md
  Increment version number to 2.1.5.9000
  Added solution to #51 for joint questionnaires
  Adjusted #51 tests
  Added solution to #51 for separate questionnaires
  Added unit tests for #51
  Updated RoxygenNote version
@wleoncio
Copy link
Collaborator Author

Hi @mollyolaf,

Please try the current development version of lsasim for a fix to this issue and let me know if the solution looks adequate:

remotes::install_github("tmatta/lsasim@develop")

As a minor improvement, version 9.1.5.9001 also improved the output of cluster_gen() so that something like "Total respondents: 10 + 10 + 10 + 10" is replaced with "10 * 4" (useful for large group numbers). :)

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

No branches or pull requests

1 participant