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

Add random seed for running the non-deterministic gs_power_combo()? #340

Open
nanxstats opened this issue Feb 16, 2024 · 0 comments
Open
Labels
question Further information is requested

Comments

@nanxstats
Copy link
Collaborator

nanxstats commented Feb 16, 2024

Running gs_power_combo() with different random seeds:

withr::with_seed(41, gs_power_combo() |> summary() |> as_gt())
withr::with_seed(42, gs_power_combo() |> summary() |> as_gt())
withr::with_seed(46, gs_power_combo() |> summary() |> as_gt())

will give different efficacy for null hypothesis at the last analysis: 0.1955, 0.1956, 0.1957.

If it's ok to have slight variations due to the underlying algorithm, do we want to add a set.seed() to the relevant code examples since the results are not deterministic? Or should this result be much more deterministic theoretically?

For this reason, a with_seed() function had to be used to keep results identical in as_gt() snapshot tests in #337.

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

No branches or pull requests

1 participant