Skip to content
Prev 60078 / 398502 Next

systemfit - SUR

On Tuesday 30 November 2004 09:34, contact at thomasalmer.com wrote:
Please show how you obtained these results. 

This is what I did:
R> data( kmenta )
R> demand <- q ~ p + d
R> supply <- q ~ p + f + a
R> labels <- list( "demand", "supply" )
R> system <- list( demand, supply )
R>
R> # OLS estimation:
R> fitols <- systemfit("OLS", system, labels, data=kmenta )
R> # (non-iterated) SUR estimation
R> fitsur <- systemfit("SUR", system, labels, data=kmenta )
R> iterated SUR estimation
R> fitsurit <- systemfit("SUR", system, labels, data=kmenta, maxit=100 )
R>
R> fitols$rcov
         [,1]     [,2]
[1,] 3.725391 4.136963
[2,] 4.136963 5.784441
R> fitsur$rcovest
         [,1]     [,2]
[1,] 3.725391 4.136963
[2,] 4.136963 5.784441
R> fitsurit$rcovest
         [,1]     [,2]
[1,] 6.199071 7.493383
[2,] 7.493383 9.128547
OLS minimizes the residuals and, thus, also the variance of the residuals 
(=diagonal of the residual covariance matrix).
Iterated SUR is equivalent to a maximum likelihood estimation. Maximizing the 
likelihood value is equivalent to minimizing the determinant of the residual 
covariance matrix. Thus, the determinant of the residual covariance matrix 
and not the residuals itself are minimized:

R> det(fitols$rcov)
[1] 4.434845
R> det(fitsurit$rcov)
[1] 0.4376941
R> det(fitsurit$rcovest)
[1] 0.4377184
If you use iterated SUR, the SUR estimations are iterated. In the first SUR 
estimation the residual covariance matrix of the OLS estimation is used. In 
all following iterations the residual covariance matrix of the previous step 
SUR estimation is used.
Please read the documentation. It says to set argument "maxit" to 1 - or do 
not provide this argument, since 1 is the default.
I don't understand what you want to test. Does the hausman test what you are 
looking for (see ?hausman.systemfit). If you have questions regarding this 
test, you might ask my co-author of systemfit, Jeff Hamann.

Best wishes,
Arne