Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Hannan-Quinn Criterion for nonstationary series


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: Hannan-Quinn Criterion for nonstationary series
Date   Tue, 8 Feb 2005 18:03:39 -0600

Sean,

I would think you would be able to use -varsoc- for each cross-section to
find the optimal lag length.

Below, is an example where -varsoc- is used to determine the optimal lag
length for each county and then these values are fed into -levinlin-.

Hope this helps,
Scott

use http://fmwww.bc.edu/ec-p/data/hayashi/sheston91.dta,clear
qui {
keep if country < 13
preserve
levels country, local(levels)
foreach l of local levels {
	varsoc rgdp if country == `l'
	matrix A = r(stats)
	if `l' > 1 {
		matrix C = C \ A
	}
	else {
		matrix C = A
	}
}
svmat C, name(col)
keep if HQ < .

egen id = fill(1 1 1 1 1 2 2 2 2 2)

egen minh = min(H), by(id)
gen optimal_lag = lag if minh == HQ

sort id opt
forv i = 1(5)60 {
	local lag = opt[`i']
	local opt_lag "`opt_lag' `" "' `lag'"
}

restore
}
levinlin rgdp, lag(`opt_lag')


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Sean MC allister
> Sent: Tuesday, February 08, 2005 4:35 AM
> To: [email protected]
> Subject: st: Hannan-Quinn Criterion for nonstationary series
> 
> Hi
> I'm performing a convergence test on panel data based on the unit root
> test
> of Levin and Lin. I face the problem of selecting, for each country, the
> lag's length which eliminates residual autocorrelation. I wanted to use
> the
> Hannan-Quinn's criterion but the only command I found to get it is
> "varsoc"
> which is used for VAR. I worry because my sample is very small (T=11 and
> N=15). Is there a command that give this criterion for short nonstationary
> time series?
> I hope you could help me and I thank you in advance for your answer.
> Yours sincerely,
> Sean



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index