Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Estimating ucm model in a subsample

    Hi - I'm trying to estimate an unobserved components model using a subsample of my data and then predict the trend component out-of-sample using information only from the subsample. But when I try to do that I get an error message that suggests that subsample estimation is not allowed with with unobserved component models.

    Specifically my code is:

    ucm loggdp, model(strend) cycle(1) if inrange(date, tq(1955q1), tq(2010q1))

    I then get the following error message

    options if inrange if inrange(date, tq(1955q1), tq(2010q1)) are not allowed

    Is there a way of doing this?

  • #2
    The -if- expression goes before comma and options:

    Code:
    .  webuse unrate
    
    . ucm unrate if inrange( daten ,td(31dec1960), td(31dec2000)),  cycle(1)  nolog
    
    Unobserved-components model
    Components: random walk, order 1 cycle
    
    Sample: 1961m1 thru 2000m12                           Number of obs =      480
                                                          Wald chi2(2)  = 21689.95
    Log likelihood = 160.05467                            Prob > chi2   =   0.0000
    ------------------------------------------------------------------------------
          unrate | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
       frequency |   .0785715   .0159008     4.94   0.000     .0474065    .1097365
         damping |   .9825634   .0068984   142.43   0.000     .9690427    .9960841
    -------------+----------------------------------------------------------------
       var(level)|   .0127676   .0054855     2.33   0.010     .0020162     .023519
      var(cycle1)|   .0163967    .005639     2.91   0.002     .0053445    .0274489
    ------------------------------------------------------------------------------
    Note: Model is not stationary.
    Note: Tests of variances against zero are one sided, and the two-sided
          confidence intervals are truncated at zero.

    Comment

    Working...
    X