From cottrell@wfu.edu Wed Mar 2 09:18:17 2011 From: Allin Cottrell To: gretl-users@gretlml.univpm.it Subject: Re: [Gretl-users] Q-statistic Date: Wed, 02 Mar 2011 09:18:16 -0500 Message-ID: In-Reply-To: 32618_1299060857_p22AEGMR000750_snt141-w65026F7123383A3047421A8BC00@phx.gbl MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8599619676197590542==" --===============8599619676197590542== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Wed, 2 Mar 2011, Sam Sam wrote: > I run ARIMA(1,0,1) by conditional maximum likelyhood. > the residual is : > > table1: > uhat2 > 1980:01 > 1980:02 -5.421687 > 1980:03 -0.506024 > 1980:04 1.867470 > 1980:05 1.698795 > > I choose the options /Graphs/--/Risidual correlogram/ > output of Residual autocorrelation function shows: > > table2: > LAG ACF PACF Q-stat. [p-value] > > 1 0.1567 0.1567 0.1964 [0.658] > 2 -0.3373 -0.3710 1.5619 [0.458] > 3 -0.3194 -0.2244 4.0097 [0.260] > > I caucualte Q-statistic by the formulation of Ljung-Box statistc from table1, > but the values I cauculate by myself seem not equal to the values of table2 (0.1964, 1.5619, and 4.0097) > Maybe I mistake somewhere. Here is a script that calculates ACF and Q just as gretl does, using the residuals you got: Allin Cottrell --===============8599619676197590542==--