Confidence intervals via bootstrapping
This question isn't related to Python. I think you need to read an intro to bootstrapping. "An Introduciton to Statistical Learning" provides a good one. The idea is not to sample 100 -- you must sample with replacement and taking the same sample size (500). Yes, then you reestimate your parameter many times. And then there's several ways of taking all of these estimates and turning them into a confidence interval. For example, you can use them to estimate the standard error (the standard deviation of the sampling distribution), and then use +/- 2*se.
Yesterday I began to read about using bootstrapping to determine confidence intervals (CIs) in many situations. My current situation is that I am trying to estimate three parameters in a model via maximum likelihood estimation (MLE). This I have done, and now I need to define my CIs. This can obviously be done via profile likelihood, but bootstrapping will give a more broad CI interval as far as I can read. My problem is that I am unsure on how to actually perform bootstrapping ? I have written my own code for the parameter estimation, so no build-in MLE calculators.
Basically the observed data I have is binary data, so 1 or 0. And it's from those data (put into a model with three parameters) that I have tried to estimate the parameter values.
So let's say my cohort is 500, is the idea then that I take a sample from my cohort, maybe 100, and then expand it to 500 again by just multiplying the sample 5 times, and run the simulation once again, which in turn should result in some new parameter estimates, and then just do this 1000-2000 times in order to get a series of parameter values, which can then be used to define the CI ?
Or am I missing something here ?