waldtest.systemfit( object, R.restr,
q.restr = rep( 0, nrow( R.restr ) ) ) ## S3 method for class 'waldtest.systemfit':
print( x, digits = 4, ... )
systemfit
.R.restr
* $b$ = q.restr
(j = number of restrictions, k = number of all parameters,
$b$ = vector of all parameters).R.restr
); default is a vector
that contains only zeros.waldtest.systemfit
.waldtest.systemfit
returns a list of class waldtest.systemfit
that includes following objects:systemfit
, ftest.systemfit
,
lrtest.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 test whether \eqn{beta_2 = \beta_6}
R1 <- matrix( 0, nrow = 1, ncol = 7 )
R1[ 1, 2 ] <- 1
R1[ 1, 6 ] <- -1
## perform Wald-test
waldTest1 <- waldtest.systemfit( fitsur, R1 )
print( waldTest1 ) # rejected
# create restriction matrix to test whether \eqn{beta_2 = - \beta_6}
R2 <- matrix( 0, nrow = 1, ncol = 7 )
R2[ 1, 2 ] <- 1
R2[ 1, 6 ] <- 1
## perform Wald-test
waldTest2 <- waldtest.systemfit( fitsur, R2 )
print( waldTest2 ) # accepted
Run the code above in your browser using DataLab