Hi all,
I'd like to save the AIC values of a number of models in a dataset. I have the following code below. But I am not actually getting the AIC value like this, the local remains empty... Can anyone help?
Thanks!
Sandra
foreach var of varlist rural_wb-bcg{
use prev_allcov_4model, clear
quietly xtmelogit bc `var' || iso3: , binomial(n) or
estat ic
regsave using xtmelogit_`var', replace
use xtmelogit_`var', clear
local aic=s[1,6]
gen aic=`aic'
gen model="`var'"
save xtmelogit_`var', replace
use prev_allcov_4model, clear
}
I'd like to save the AIC values of a number of models in a dataset. I have the following code below. But I am not actually getting the AIC value like this, the local remains empty... Can anyone help?
Thanks!
Sandra
foreach var of varlist rural_wb-bcg{
use prev_allcov_4model, clear
quietly xtmelogit bc `var' || iso3: , binomial(n) or
estat ic
regsave using xtmelogit_`var', replace
use xtmelogit_`var', clear
local aic=s[1,6]
gen aic=`aic'
gen model="`var'"
save xtmelogit_`var', replace
use prev_allcov_4model, clear
}
Comment