I have a sample of about 100 firms, and a number of peers (from 1 to 40) for each firm. I'm using the bootstrap command to, basically, compute an average value that involves running a regression each time with one different peer per firm. That is why I'm using the following command:
bootstrap, strata(firm_id) size(1): reg y x
I'm quite convinced this is ok, but the problem is that the boostrapped regression results show as the "number of observations" the total size of the dataset, instead of 100 (given that in theory it is taking 1 random peer by firm in every iteration, so each regression is using 100 observations). Is this a mistake or am I doing something wrong in how I'm using the strata option?
By the way, when I use the bsample command in the following form;
bsample, strata(firm_id) size(1)
I end up having a sample of 100 observations (one peer per firm), so that should be consistent with what I'm doing above, right?
Thanks,
Dany
bootstrap, strata(firm_id) size(1): reg y x
I'm quite convinced this is ok, but the problem is that the boostrapped regression results show as the "number of observations" the total size of the dataset, instead of 100 (given that in theory it is taking 1 random peer by firm in every iteration, so each regression is using 100 observations). Is this a mistake or am I doing something wrong in how I'm using the strata option?
By the way, when I use the bsample command in the following form;
bsample, strata(firm_id) size(1)
I end up having a sample of 100 observations (one peer per firm), so that should be consistent with what I'm doing above, right?
Thanks,
Dany
Comment