Hi all,
I have run a model xtabond2 model with bootstrapping (using Stata 17). Since some my panels have small T I have limited my sample to to observation with a min of 8 obs. in the relevant variables (using egen for observation counting and a filter) I finally ask Stata to:
. However, when I run the model, I see that the
. How can this be possible?
Below is the code:


I have run a model xtabond2 model with bootstrapping (using Stata 17). Since some my panels have small T I have limited my sample to to observation with a min of 8 obs. in the relevant variables (using egen for observation counting and a filter) I finally ask Stata to:
Code:
Keep if filter_obs_8==1
Obs per group: min = 2
Below is the code:
Code:
egen obs_count_ERP = count(l_ERP_interp), by(Country1) egen obs_count_l_ERP = count(l_l_ERP_interp), by(Country1) egen obs_count_Corr_hp = count(Corr_hp_interp), by(Country1) egen obs_count_WGI = count(WGI_interp), by(Country1) egen obs_count_GPI = count(GPI_interp), by(Country1) egen obs_count_Inflation = count(l_Inflation_interp), by(Country1) egen obs_count_GDPcapita = count(l_GDPcapita_interp), by(Country1) egen obs_count_GDPgrw = count(GDPgrw_interp), by(Country1) gen filter_obs_8 = (obs_count_ERP >=8 & obs_count_l_ERP>=8 & obs_count_GDPgrw >=8 & obs_count_Corr_hp >= 8 & obs_count_WGI >= 8 & obs_count_GPI >= 8 & obs_count_Inflation >= 8 & obs_count_GDPcapita >=8) *This is for keeping only observation with no gaps in the data generate sample=1-missing(l_ERP_interp, l_l_ERP_interp ,l_Inflation_interp ,l_GDPcapita_interp, GPI_interp, Corr_hp_interp, GDPgrw_interp, WGI_interp) keep if sample generate sample1= sample if filter_obs_8==1 keep if sample1 xtset Country1 year generate newid = Country1 xtset newid year bootstrap _b, rep(50) seed(12345) cluster(Country1) idcluster(newid):xtabond2 l_ERP_interp l_l_ERP_interp l_GDPcapita_interp Corr_hp GPI_interp l_Inflation_interp GDPgrw_interp WGI_interp i.year, gmm( l_l_ERP_interp , lag(2 4) collapse) gmm(l_GDPcapita_interp GDPgrw_interp l_Inflation_interp WGI_interp , lag(1 2) collapse) iv( GPI_interp Corr_hp i.year, equation(level)) robust


Comment