Can a unique variable affect on the result of others variables in a nested loop?

I create a nested for loop in R, where under the first loop ( for simulation of the whole output), there are two for loop One gives the output for conventional results, and the last one is dedicated to bootstrapping. In the bootstrapping loop, the data are taken from the second loop(conventional results loop) and I declare every variable as unique in this loop, so it is not efficient to separate this bootstrapping loop from that. However, I have faced a problem: increasing sample sizes for bootstrapping affects the conventional results, which seems not logical to me. Changing the sample size for bootstrap( the number of repetitions the for loop for bootstrapping), the data changes (which is the output of the second loop). Give me precise and effective suggestions to solve this problem.

Hi, welcome to the forum.

I do not think we can help without your code and some sample data.

Have a look at FAQ Asking Questions

1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.