Arsenio Staer <arsenio.staer@gmail.com> has a question about the -mgarch-
command:
> I'm tryinq out MGARCH DCC.
> However in my panel data setting, this command run in foreach loops:
> noisily mgarch dcc (RET VWRETD = L.RET l.VWRETD noconstant)
> gives an error
> sample may not include multiple panels
> r(459);
Arsenio can loop over panels as the example below illustrates.
--Rafal
rraciborski@stata.com
================================= begin example =============================
clear
set more off
//create fake data
set seed 123
set obs 300
egen time = seq(), to(100)
egen id = seq(), block(100)
gen ret = rnormal()
gen vwretd = rnormal()
gen sticker = "AA"
replace sticker = "APPL" if id==2
replace sticker = "MY STK" if id==3
xtset id time
levelsof sticker, local(names)
foreach i in `names' {
capture noi mgarch dcc (ret vwretd =) if sticker==`"`i'"', arch(1)
if _rc {
//command failed
}
else {
//save any results if needed
}
}
================================== end example ==============================
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/