Skip to content

Add clustered bootstrap#90

Merged
Kss2k merged 5 commits intomainfrom
cluster-boot
Oct 5, 2025
Merged

Add clustered bootstrap#90
Kss2k merged 5 commits intomainfrom
cluster-boot

Conversation

@Kss2k
Copy link
Owner

@Kss2k Kss2k commented Oct 5, 2025

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 159 to 163
printedLines <- utils::capture.output(split = TRUE, {
if (verbose) printf("Bootstrap %d/%d...\n", i, R)

sample_i <- population[sample(P, N), ]
sample_i <- resample(population, cluster = cluster)
argList_i <- c(argList, list(data = sample_i))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Parametric bootstrap now samples full population size

Replacing population[sample(P, N), ] with resample(population, cluster = cluster) causes parametric bootstraps to draw P rows per replicate, where P is the simulated population size (min(P.max, N * R)). resample() resamples NROW(population) rows, so parametric runs now fit each bootstrap replicate on the entire simulated population rather than the original sample size N, drastically inflating computation and producing statistics for an incorrect sample size. The resampling helper should only take N draws from the simulated population in the parametric case.

Useful? React with 👍 / 👎.

@Kss2k Kss2k merged commit fce79ab into main Oct 5, 2025
12 checks passed
@Kss2k Kss2k deleted the cluster-boot branch October 8, 2025 11:42
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