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

Think about how to resample data with reweighting #117

Open
kostrzewa opened this issue Jan 9, 2019 · 1 comment
Open

Think about how to resample data with reweighting #117

kostrzewa opened this issue Jan 9, 2019 · 1 comment

Comments

@kostrzewa
Copy link
Member

kostrzewa commented Jan 9, 2019

For at least two projects we will have to work with reweighting factors which will affect how the mean should be computed on each sample. Unfortunately, tsboot offers no real help unless we store the reweighting factor as a row in the original data (which would be a terrible idea) and supply our own mean function which then properly computes the mean with measurements rescaled by the appropriate reweighting factors and divided by the appropriate sum of the factors.

The only straightforward way I see for implementing this is to multiply the data with the reweighting factors and run tsboot or boot as usual. At this point there are two options:

  1. reset the seed and bootstrap the reweighting factors and then normalise each bootstrap sample with the correct sum over the reweighting factors
  2. use boot.array to get the indices used by tsboot or boot in the previous step and normalise each boostrap sample by the correct sum over the reweighting factors.

@urbach After this, the variance should be given as usual, right?

@kostrzewa
Copy link
Member Author

closed by #185

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

No branches or pull requests

1 participant