Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: MGARCH DCC in panel settings - error?

Subject   st: MGARCH DCC in panel settings - error?
Date   Tue, 13 Mar 2012 09:34:06 -0500

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


================================= 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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index