| lrtest.systemfit {systemfit} | R Documentation |
Likelihood Ratio test for linear parameter restrictions in equation system.
lrtest.systemfit( resultc, resultu ) ## S3 method for class 'lrtest.systemfit': print( x, digits = 4, ... )
resultc |
an object of type systemfit that
contains the results of the restricted estimation. |
resultu |
an object of type systemfit that
contains the results of the unconstrained estimation. |
x |
an object of class ftest.systemfit. |
digits |
number of digits to print. |
... |
currently not used. |
The LR-statistic for sytems of equations is
LR = T cdot ( log <=ft| hat{ hat{ Σ } }_r right| - log <=ft| hat{ hat{ Σ } }_u right| )
where T is the number of observations per equation, and
hat{hat{Σ}}_r and hat{hat{Σ}}_u are
the residual covariance matrices calculated by formula "0"
(see systemfit)
of the restricted and unrestricted estimation, respectively.
Asymptotically, LR has a chi^2
distribution with j degrees of freedom
under the null hypothesis
(Green, 2003, p. 349).
lrtest.systemfit returns a list of class lrtest.systemfit
that includes following objects:
statistic |
the empirical likelihood ratio statistic. |
p.value |
the p-value of the chi^2-test. |
nRestr |
number of restrictions (j, degrees of freedom). |
Arne Henningsen ahenningsen@agric-econ.uni-kiel.de
Greene, W. H. (2003) Econometric Analysis, Fifth Edition, Prentice Hall.
systemfit, ftest.systemfit,
waldtest.systemfit
data( "Kmenta" )
eqDemand <- consump ~ price + income
eqSupply <- consump ~ price + farmPrice + trend
system <- list( demand = eqDemand, supply = eqSupply )
## unconstrained SUR estimation
fitsur <- systemfit( "SUR", system, data = Kmenta )
# create restriction matrix to impose \eqn{beta_2 = \beta_6}
R1 <- matrix( 0, nrow = 1, ncol = 7 )
R1[ 1, 2 ] <- 1
R1[ 1, 6 ] <- -1
## constrained SUR estimation
fitsur1 <- systemfit( "SUR", system, data = Kmenta, R.restr = R1 )
## perform LR-test
lrTest1 <- lrtest.systemfit( fitsur1, fitsur )
print( lrTest1 ) # rejected
# create restriction matrix to impose \eqn{beta_2 = - \beta_6}
R2 <- matrix( 0, nrow = 1, ncol = 7 )
R2[ 1, 2 ] <- 1
R2[ 1, 6 ] <- 1
## constrained SUR estimation
fitsur2 <- systemfit( "SUR", system, data = Kmenta, R.restr = R2 )
## perform LR-test
lrTest2 <- lrtest.systemfit( fitsur2, fitsur )
print( lrTest2 ) # accepted