Dear Statalisters,
I am encountering an unusual error while attempting to perform a two-step bootstrap using a program. The code is divided into three parts: data loading and setup, program section, and bootstrap section with the command "bootstrap_two_steps, rep(50) nodrop". However, I am encountering the following error:
Bootstrap replications (50) ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (in red) 50 insufficient observations to compute bootstrap standard errors no results will be saved
In the program, I have two regressions where the prediction from the first regression is used in the second regression. Before starting the second regression, I filter the data using the following condition: keep if country==1. When I remove this filter from the program, I obtain the result of the final regression with the bootstrap standard error. However, I need to keep this filter in my model. How can I do this without encountering the error? Can you please assist me with this issue?
Thank you very much for your attention.
Best,
Diego.
I am encountering an unusual error while attempting to perform a two-step bootstrap using a program. The code is divided into three parts: data loading and setup, program section, and bootstrap section with the command "bootstrap_two_steps, rep(50) nodrop". However, I am encountering the following error:
Bootstrap replications (50) ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (in red) 50 insufficient observations to compute bootstrap standard errors no results will be saved
In the program, I have two regressions where the prediction from the first regression is used in the second regression. Before starting the second regression, I filter the data using the following condition: keep if country==1. When I remove this filter from the program, I obtain the result of the final regression with the bootstrap standard error. However, I need to keep this filter in my model. How can I do this without encountering the error? Can you please assist me with this issue?
Thank you very much for your attention.
Best,
Diego.