mtest.fct {pdynmc}R Documentation

Arellano and Bond Serial Correlation Test.

Description

mtest.pdynmc Methods to test for serial correlation in the error terms for objects of class 'pdynmc'.

Usage

mtest.fct(object, order = 2, ...)

Arguments

object

An object of class 'pdynmc'.

order

A number denoting the order of serial correlation to test for (defaults to '2').

...

further arguments.

Details

The null hypothesis is that there is no serial correlation of a particular order. The test statistic is computed as proposed by Arellano and Bond (1991) and Arellano (2003).

Value

An object of class 'htest' which contains the Arellano and Bond m test statistic and corresponding p-value for the null hypothesis that there is no serial correlation of the given order.

References

Arellano M (2003). Panel Data Econometrics. Oxford University Press. doi:10.1093/0199245282.001.0001.

Arellano M, Bond S (1991). “Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations.” The Review of Economic Studies, 58(2), 277–297. doi:10.2307/2297968.

See Also

pdynmc for fitting a linear dynamic panel data model.

Examples

## Load data
data(ABdata, package = "pdynmc")
dat <- ABdata
dat[,c(4:7)] <- log(dat[,c(4:7)])
dat <- dat[c(140:0), ]

## Code example
m1 <- pdynmc(dat = dat, varname.i = "firm", varname.t = "year",
    use.mc.diff = TRUE, use.mc.lev = FALSE, use.mc.nonlin = FALSE,
    include.y = TRUE, varname.y = "emp", lagTerms.y = 2,
    fur.con = TRUE, fur.con.diff = TRUE, fur.con.lev = FALSE,
    varname.reg.fur = c("wage", "capital", "output"), lagTerms.reg.fur = c(1,2,2),
    include.dum = TRUE, dum.diff = TRUE, dum.lev = FALSE, varname.dum = "year",
    w.mat = "iid.err", std.err = "corrected", estimation = "onestep",
    opt.meth = "none")
mtest.fct(m1, order = 2)


## Load data
 data(ABdata, package = "pdynmc")
 dat <- ABdata
 dat[,c(4:7)] <- log(dat[,c(4:7)])

## Further code example
 m1 <- pdynmc(dat = dat, varname.i = "firm", varname.t = "year",
    use.mc.diff = TRUE, use.mc.lev = FALSE, use.mc.nonlin = FALSE,
    include.y = TRUE, varname.y = "emp", lagTerms.y = 2,
    fur.con = TRUE, fur.con.diff = TRUE, fur.con.lev = FALSE,
    varname.reg.fur = c("wage", "capital", "output"), lagTerms.reg.fur = c(1,2,2),
    include.dum = TRUE, dum.diff = TRUE, dum.lev = FALSE, varname.dum = "year",
    w.mat = "iid.err", std.err = "corrected", estimation = "onestep",
    opt.meth = "none")
 mtest.fct(m1, order = 2)




[Package pdynmc version 0.9.11 Index]