vasanchez16 / smokeppe_constraints

Implementation of frequentist confidence sets for climate model parameter constraints
MIT License
1 stars 0 forks source link

Integrate methods for bootstrapping #7

Open vasanchez16 opened 5 months ago

vasanchez16 commented 5 months ago

Implement methods for bootstrap estimation for both the pivotal and non-pivotal cases. First work will be done to implement the scripts for this. Then there will be work done to parallelize some of the methods.

vasanchez16 commented 4 months ago

@JamesCarzon ,

Just wanted to let you know I took the nu out of the bootstrap calculations like we discussed in meeting. I am also going to be removing the pivotal and non pivotal options for the bootstrap since we only will be using one method here

vasanchez16 commented 4 months ago

@JamesCarzon ,

the (nu - 2)/nu lines of the code only runs if the method chosen for the run is the regular student-t distribution without the bootstrap implementation so it should have no effect on the runs we are moving forward with but I think we should leave the code in there

JamesCarzon commented 4 months ago

I see what you mean. You are right -- it should stay for the non-bootstrapped example since the simulated null distribution is drawing T and not sqrt((nu-2)/nu)*T. However, in my opinion these should be rescaled in both implausibility/implausibility.py and confidence/utils.py for consistency.

vasanchez16 commented 4 months ago

I'm not sure I understand. For the student-t bootstrap, the nu factor is not included in the bootstrap and not included in the implausibility calculations. For the regular student-t assumption, the nu factor is accounted for in the implausibility and not needed in the threshold because we are pulling from a regular student t distribution.

Do you mind pointing out the lines of code that are problematic?

JamesCarzon commented 4 months ago

I agree with you. The calculation looks good to me. I'm just suggesting not rescaling the implausibility and instead rescaling the simulated noise for the reason I think it's more consistent with how the bootstrap alternative is implemented. But this is an aesthetic judgment. We should leave it as is for now and perhaps worry later if you want to publish the code.

vasanchez16 commented 4 months ago

ok sounds good we can look at this again later on