when I am using loop, I have 478 value variables. The data not fit the model sometimes, and the loop will get stuck. I tried to use -capture- to tell STATA, pls skip the error and keep working.
Here is my code:
unfortunately, it doesn't work.
I am really grateful if someone could help me figure it out.
Many thanks!
Here is my code:
Code:
forvalue i=1(1)478{
capture noisily:
arch ut rmrf smb hml umd if id==`i', earch(1) egarch(1) distribution(t)
predict variance1 if id==`i', variance
replace var2=variance1 if id==`i'
drop variance1
if _rc==0{
continue
}
}
unfortunately, it doesn't work.
I am really grateful if someone could help me figure it out.
Many thanks!

Comment