Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: MGARCH DCC in panel settings - error?

From   [email protected]
To   [email protected]
Subject   st: MGARCH DCC in panel settings - error?
Date   Tue, 13 Mar 2012 09:34:06 -0500

Arsenio Staer <[email protected]> has a question about the -mgarch-

> 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.

[email protected]

================================= begin example =============================
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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index