Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -lrtest- : "samples differ"


From   "Danielle H. Ferry" <[email protected]>
To   [email protected]
Subject   st: -lrtest- : "samples differ"
Date   Thu, 15 Jun 2006 16:32:13 -0400

Dear Statalisters,

I am trying to perform a LR test using -lrtest- on 2 nested models that are
estimated using -arima-. I am actually doing this in a loop. While everything
else in the loop has gone smoothly so far, one run of the loop produces an
error after -lrtest-: "samples differ". I am pasting below the results of both
models. It is not clear to me how the samples differ. Can someone please help
shed light on this error? 

Thanks,
Danielle Ferry

. est r
--------------------------------------------------------------------------------
Model v1
--------------------------------------------------------------------------------

ARIMA regression

Sample:  1998q1 to 2006q1                       Number of obs      =        33
                                                Wald chi2(13)      =     77.52
Log likelihood =  65.20513                      Prob > chi2        =    0.0000

------------------------------------------------------------------------------
             |                 OPG
   D.cdefJUM |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
cdefJUM      |
grRate_per~c |
        L2D. |   1.050329   .4670402     2.25   0.025     .1349467    1.965711
     corr_ue |
         L3. |  -.0768849   .0869923    -0.88   0.377    -.2473867     .093617
  index_herf |
         L3. |   3.187155   7.768851     0.41   0.682    -12.03951    18.41382
  grRate_hpi |
        L3D. |  -1.166311   .6600636    -1.77   0.077    -2.460012    .1273904
index_divX~l |
        L3D. |  -3.582336   2.017353    -1.78   0.076    -7.536275    .3716037
      vol_ue |
        L3D. |    .286281   .2202227     1.30   0.194    -.1453475    .7179096
      chg_ue |
         L4. |  -.0350073    .039897    -0.88   0.380     -.113204    .0431894
index_empStr |
        L4D. |   -.018157   .0061664    -2.94   0.003     -.030243   -.0060711
index_hai_~l |
        L4D. |  -.0033723   .0022559    -1.49   0.135    -.0077938    .0010492
          ue |
        L4D. |   .0137407    .016543     0.83   0.406     -.018683    .0461645
  grRate_gsp |
         LD. |  -1.410911   3.674484    -0.38   0.701    -8.612768    5.790945
        time |  -.0068417   .0030396    -2.25   0.024    -.0127992   -.0008842
       _cons |   .7078237    1.26332     0.56   0.575    -1.768239    3.183886
-------------+----------------------------------------------------------------
ARMA         |
          ar |
         L1. |   .8342549   .1618278     5.16   0.000     .5170783    1.151432
-------------+----------------------------------------------------------------
      /sigma |   .0329504   .0087411     3.77   0.000     .0158181    .0500826
------------------------------------------------------------------------------

. est stat
------------------------------------------------------------------------------
       Model |    Obs    ll(null)   ll(model)     df          AIC         BIC
-------------+----------------------------------------------------------------
          v1 |     33           .    65.20513     15    -100.4103   -77.96264
          v2 |     33           .    66.37169     20    -92.74339   -62.81324
------------------------------------------------------------------------------

. est r
--------------------------------------------------------------------------------
Model v2
--------------------------------------------------------------------------------

ARIMA regression

Sample:  1998q1 to 2006q1                       Number of obs      =        33
                                                Wald chi2(18)      =     94.94
Log likelihood =  66.37169                      Prob > chi2        =    0.0000

------------------------------------------------------------------------------
             |                 OPG
   D.cdefJUM |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
cdefJUM      |
grRate_per~c |
        L2D. |   1.009204   .6632982     1.52   0.128    -.2908367    2.309245
     corr_ue |
         L3. |  -.0687796   .1115346    -0.62   0.537    -.2873834    .1498242
  index_herf |
         L3. |   7.672428   11.63437     0.66   0.510    -15.13052    30.47537
  grRate_hpi |
        L3D. |  -.8767668   .7005048    -1.25   0.211    -2.249731    .4961973
index_divX~l |
        L3D. |  -3.435669   2.060106    -1.67   0.095    -7.473403    .6020643
      vol_ue |
        L3D. |   .2318363    .328985     0.70   0.481    -.4129626    .8766351
      chg_ue |
         L4. |  -.0657352   .0646834    -1.02   0.310    -.1925123    .0610419
index_empStr |
        L4D. |  -.0166287   .0064652    -2.57   0.010    -.0293002   -.0039571
index_hai_~l |
        L4D. |  -.0028197    .002613    -1.08   0.281    -.0079412    .0023017
          ue |
        L4D. |   .0246965   .0246577     1.00   0.317    -.0236316    .0730247
  grRate_gsp |
         LD. |  -.7753115   3.590427    -0.22   0.829     -7.81242    6.261797
   grRate_ip |
        L2D. |   .2559729   1.270736     0.20   0.840    -2.234623    2.746569
     homebuy |
        L2D. |   -.058201   .1256407    -0.46   0.643    -.3044523    .1880503
     confGap |
        L3D. |   .0005927   .0007941     0.75   0.455    -.0009638    .0021493
  grRate_lei |
        L4D. |  -.4626627   1.302644    -0.36   0.722    -3.015798    2.090473
grRate_mon~r |
        L4D. |  -.0367778   .6501572    -0.06   0.955    -1.311062    1.237507
        time |  -.0070249   .0034281    -2.05   0.040    -.0137438   -.0003059
       _cons |   .0928921   1.805949     0.05   0.959    -3.446703    3.632487
-------------+----------------------------------------------------------------
ARMA         |
          ar |
         L1. |   .8299204   .1840959     4.51   0.000     .4690991    1.190742
-------------+----------------------------------------------------------------
      /sigma |   .0318132   .0073969     4.30   0.000     .0173155    .0463109
------------------------------------------------------------------------------

. est stat
------------------------------------------------------------------------------
       Model |    Obs    ll(null)   ll(model)     df          AIC         BIC
-------------+----------------------------------------------------------------
          v1 |     33           .    65.20513     15    -100.4103   -77.96264
          v2 |     33           .    66.37169     20    -92.74339   -62.81324
------------------------------------------------------------------------------



--
National Bureau of Economic Research <http://www.nber.org>


---------- Original Message -----------
From: "Michael S. Hanson" <[email protected]>
To: [email protected]
Sent: Thu, 15 Jun 2006 15:22:34 -0400
Subject: Re: st: RE: Modifying -irf graph- output

> .	
> 	
> [Note: I have edited my original questions and Scott's reply to  
> clarify further comments.]
> 
> On Jun 15, 2006, at 12:53 PM, Scott Merryman wrote:
> 
> > On Jun 15, 2006, at 12:27 PM, I wrote:
> >>
> >> 	1. How does one add a title to the whole plot?
> >>
> >> 	2. How does one change the text of and/or remove the legend and  
> >> the note?
> >>
> >> 	3. How does one change/control the axis labels and titles?  In
> >> particular, I want to either change or delete the text that reads
> >> "step" by default beneath the final row of subplots.
> >
> > For 1. and 2. take a look at -byopts- option and the axis title can  
> > be added at the end.
> >
> > For example:
> >
> > irf graph irf, irf(test_irf) byopts(title(My Title) note("") ///
> >  legend(off)) xtitle(Years) ytitle(My ytitle)
> 
> 	Thanks, Scott -- I had misinterpreted what -byopts- was designed to 
>  do, so I had not explored that option.  -byopts(title())- resolves 
> my  first question above.  I appreciate your or anyone else's input 
> on  aspects of these remaining questions:
> 
> 	2. -byopts(legend())- seems to support only a subset of the options 
>  of -legend-:  basically, I have been able to get -off- and -pos()-
>  to  work, but none of the other options of -legend- I have tried 
> (e.g., - order()-, -stack-, -size()-, -symx()-).  Is this a 
> "feature"?  Or am  I missing something?
> 
> 	3. The -xtitle- option (*outside* of -byopts-) addresses in part  
> what I was after in the third question.  However, -xtitle- only  
> applies to the whole final row of subplots, as does -xlabel-.  Is  
> there a way to modify the x-axes on the other rows?  (Or the y-axes  
> for any column other than the first?)
> 
> 	4. An additional question, if I may be so bold:  I would like to  
> change the subtitles at the top of each subplot in a way that still  
> conveys which response and impulse are plotted.  For example,
>  instead  of "test_irf, lconsumption, lincome", I would like the (1,
> 2) subplot  to read, say, "Response of log(Y) to a log(C) shock".  
> The -subtitle-  option will allow one to change the text at the top 
> of each subplot,  but I haven't figured out how to specify the 
> response and impulse  variables within this option.  Perhaps if it 
> were possible to extract  specific elements of r(response) and 
> r(impulse)...?  Also, I had  hoped that labeling the variables would 
> change what was shown in the  subtitles, but (apparently) to no avail.
> 
> 	Thanks again for your assistance.
> 
>                                          -- Mike
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
------- End of Original Message -------


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index