Description Usage Arguments Details Value Author(s) See Also Examples
Testing hypothesis in Almost Ideal Demand Systems by a Likelihood Ratio test.
1 2  |    ## S3 method for class 'aidsEst'
lrtest( object, ... )
 | 
object | 
 a fitted model object of class   | 
... | 
 further fitted model objects of class   | 
lrtest.aidsEst consecutively compares
the fitted model object object
with the models passed in ....
An object of class anova,
which contains the log-likelihood value,
degrees of freedom, the difference in degrees of freedom,
likelihood ratio Chi-squared statistic and corresponding p value.
See documentation of lrtest
in package "lmtest".
Arne Henningsen
aidsEst, lrtest
(package "lmtest"),
logLik.aidsEst
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34  |    # Using data published in Blanciforti, Green & King (1986)
   data( Blanciforti86 )
   # Data on food consumption are available only for the first 32 years
   Blanciforti86 <- Blanciforti86[ 1:32, ]
   # names of prices and expenditure shares
   priceNames <- c( "pFood1", "pFood2", "pFood3", "pFood4" )
   shareNames <- c( "wFood1", "wFood2", "wFood3", "wFood4" )
   # estimation with symmetry and homogeneity imposed
   estResult <- aidsEst( c( "pFood1", "pFood2", "pFood3", "pFood4" ),
      c( "wFood1", "wFood2", "wFood3", "wFood4" ), "xFood",
      data = Blanciforti86 )
   # estimation with only homogeneity imposed
   estResultHom <- aidsEst( c( "pFood1", "pFood2", "pFood3", "pFood4" ),
      c( "wFood1", "wFood2", "wFood3", "wFood4" ), "xFood",
      data = Blanciforti86, sym = FALSE )
   # unrestricted estimation
   estResultUnr <- aidsEst( c( "pFood1", "pFood2", "pFood3", "pFood4" ),
      c( "wFood1", "wFood2", "wFood3", "wFood4" ), "xFood",
      data = Blanciforti86, sym = FALSE, hom = FALSE )
   # LR tests
   lrtest( estResult, estResultHom, estResultUnr, estResult )
   ## Estimation with a demand shifter: linear trend
   Blanciforti86$trend <- c( 0:( nrow( Blanciforti86 ) - 1 ) )
   estResultTrend <- aidsEst( priceNames, shareNames, "xFood",
      data = Blanciforti86, shifterNames = "trend" )
   # LR tests
   lrtest( estResult, estResultTrend )
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.