[R] Testing correlation of equation in a SUR model fitted by systemfit

Arne Henningsen arne.henningsen at gmail.com
Wed Apr 16 13:48:49 CEST 2014


Dear Paul

On 15 April 2014 19:23, Paul Smith <phhs80 at gmail.com> wrote:
> How to test whether the correlation in the matrix of correlation of a
> two-equations SUR model fitted by package systemfit are significant?

You can use a likelihood-ratio test to compare the SUR model with the
corresponding OLS model. The only difference is that the OLS model
assumes that all off-diagonal elements of the covariance matrix of the
residuals of the different equations are zero. An example:

library( "systemfit" )

# load data set
data( "Kmenta" )

# specify system of equations
eqDemand <- consump ~ price + income
eqSupply <- consump ~ price + farmPrice + trend
system <- list( demand = eqDemand, supply = eqSupply )

# estimate OLS model
fitols <- systemfit( system, data=Kmenta )

# estimate SUR model
fitsur <- systemfit( system, "SUR", data = Kmenta )

# LR test: OLS vs. SUR
lrtest( fitols, fitsur )

# estimate iterated SUR model
fititsur <- systemfit( system, "SUR", data = Kmenta, maxit = 100 )

# LR test: OLS vs. SUR
lrtest( fitols, fititsur )


If you have further questions regarding the systemfit package, you can
also use the "help" forum at systemfit's R-Forge site:

https://r-forge.r-project.org/projects/systemfit/

... and please do not forget to cite systemfit in your publications
(see output of the R command 'citation("systemfit")').

Best regards,
Arne

-- 
Arne Henningsen
http://www.arne-henningsen.name




More information about the R-help mailing list