Hi,
I have some problem with stata code.
I need to make modified jones model by industry and year.
In my code, there needs a limitation for more than 10 observations in each year x industry for regression.
Does Stata provide any command for the regressions to be run with a minimum of 10 observations?
I think maybe there needs some other code in line with bold
by fyr ind_code: gen total=_N
vallist ind_code
local a=r(list)
vallist fyr
local b=r(list)
foreach i in `a' {
foreach x in `b' {
if total>10 capture noisily reg total_acc inv_ta rev_ar s_ppe if ind_code==`i'&fyr==`x',nocons
capture noisily predict aa2,resid
capture noisily replace aa=aa2 if if ind_code==`i'&fyr==`x'
capture noisily drop aa2
}
}
I have some problem with stata code.
I need to make modified jones model by industry and year.
In my code, there needs a limitation for more than 10 observations in each year x industry for regression.
Does Stata provide any command for the regressions to be run with a minimum of 10 observations?
I think maybe there needs some other code in line with bold
by fyr ind_code: gen total=_N
vallist ind_code
local a=r(list)
vallist fyr
local b=r(list)
foreach i in `a' {
foreach x in `b' {
if total>10 capture noisily reg total_acc inv_ta rev_ar s_ppe if ind_code==`i'&fyr==`x',nocons
capture noisily predict aa2,resid
capture noisily replace aa=aa2 if if ind_code==`i'&fyr==`x'
capture noisily drop aa2
}
}
Comment