help: lmalb dialog:

Title

lmalb: Ljung-Box Autocorrelation LM Test at Higher Order AR(p)

Syntax

lmalb depvar indepvars [if] [in] [weight] , [ lags(numlist) noconstant vce(vcetype) ]

Options

lags(#) determine Order of Lag Length; default is lag(1).

noconstant suppress constant term

SE/Robust
vce(vcetype) vcetype may be ols,
robust, cluster clustvar, bootstrap,
jackknife, hc2, or hc3

Description

lmalb computes Ljung-Box Autocorrelation LM Test after regress command.

lmalb detects autocorrelation at Higher Order AR(p), more than AR(1).

J
Ljung-Box LM test = N(N+2) [ Sum(Rho_i^2/(N-k)) ] ~ Chi2(J)
i=1
where
N = Number of Observations.
k = Number of Parameters.
J = Order of Lag Length.
Rho_i = Autoregressive Coefficient of Lag i.

Saved Results

lmadurh saves the following in r():

Scalars

r(rho_#) Rho Value at Order AR(i)

r(bpl_#) Ljung-Box Autocorrelation LM Test at Order AR(i)

r(bplp_#) Ljung-Box Autocorrelation LM Test P-Value at Order AR(i)

Examples

clear all

db lmalb

sysuse lmalb.dta , clear

lmalb y x1 x2 , lags(1)

lmalb y x1 x2 , lags(4)

return list

=============================================
* Ljung-Box Autocorrelation LM Test *
=============================================
Ho: No Autocorrelation - Ha: Autocorrelation
-----------------------------------------------------------------
* Rho Value for AR(1) = -0.1455
* Ljung-Box LM Test AR(1) = 0.4272 P>Chi2(1) 0.5133
-----------------------------------------------------------------
* Rho Value for AR(2) = -0.2231
* Ljung-Box LM Test AR(2) = 1.4994 P>Chi2(2) 0.4725
-----------------------------------------------------------------
* Rho Value for AR(3) = 0.1871
* Ljung-Box LM Test AR(3) = 2.3074 P>Chi2(3) 0.5111
-----------------------------------------------------------------
* Rho Value for AR(4) = -0.3002
* Ljung-Box LM Test AR(4) = 4.5463 P>Chi2(4) 0.3371
-----------------------------------------------------------------

References

Damodar Gujarati (1995)
"Basic Econometrics"
3rd Edition, McGraw Hill, New York, USA; 717.

Ljung, G. & George Box (1979)
"On a Measure of Lack of Fit in Time Series Models",
Biometrika, Vol. 66; 265–270.

Author

Emad Abd Elmessih Shehata
Assistant Professor
Agricultural Research Center - Agricultural Economics Research Institute - Egypt
Email: emadstat@hotmail.com
WebPage: http://emadstat.110mb.com/stata.htm
WebPage at IDEAS: http://ideas.repec.org/f/psh494.html
WebPage at EconPapers: http://econpapers.repec.org/RAS/psh494.htm

lmalb Citation

Shehata, Emad Abd Elmessih (2011)

"lmalb: Stata Module to Compute Ljung-Box Autocorrelation LM Test at Higher Order AR(p) after OLS Regression"

Also see

Online: lmareg3, lmadurh, lmalb, lmabp, lmadw, lmavon (if installed).