turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- Unobserved Components Model

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-30-2015 03:42 AM

I have annual time series data for 54 years. I am trying to estimate the Unobserved Components Model.

first I import the data using the option

**file **

**Import Data**

then I use the command

**Print data -> Proc print data= file name**

I run the UCM using the command

**proc ucm data=filename; id year interval=year; model variable; irregular; level; slope; estimate;run;. **

However I get the error "the id value at observation number 2 is invalid. I am able to run UCM for the help datafile in SAS (SeriesG air) but not for my actual data

Thank you in advance

Accepted Solutions

Solution

09-25-2015
06:23 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-04-2015 01:21 PM

Identifying cycles can be tricky. High frequency cycle can be masked by an irregular component and low frequency cycle can get masked by a flexible trend. I am not sure why you are using two cycle statements. Do you think there are multiple cycles? UCM does permit you to control all aspects of cycle specification: rho=, variance= and period= options along with noest= parenthesized list gives you all the control (period specification is equivalent to frequency specification; period=2*Pi/frequency). Anyhow, here are some steps that might help in difficult cycle identification. All these steps try to reduce the flexibility of the trend component.

1. If the series level appears relatively constant, use constant trend: level variance=0 noest; No slope term.

2. If the series seems to have a fairly constant linear trend, use the line as a trend:

level variance=0 noest; slope variance=0 noest;

3. If the series has more complicated trend, use a smoother version:

level variance=0 noest; slope;

Start with just one cycle first.

UCM doc: SAS/ETS(R) 14.1 User's Guide

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-31-2015 08:32 AM

Hello -

I suspect your data does not contain a valid ID variable - most likely your variable YEAR is character or at least not in date format.

See: http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_intervals_toc.... for more information.

Would you be able to share your data or a subset?

Thanks,

Udo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-03-2015 02:16 AM

Thank you i was able to sort the problem by using the input command.

I have a data set with 64 observations and the graph suggests a trend+cycle model. i start with the LLT model and utilize the following command

**proc** **ucm** data = book;

id year interval = year;

model level;

irregular;

level;

slope;

cycle;

cycle;

estimate;

**run**;

however this is a stationary cycle and i want to estimate stochastic cycles so i modify the command and use

cycle rho=1 noest=rho;

cycle rho=1 noest=rho;

however the estimates are not correct for example the cycle period is above 100. Also can I specify the frequency in the command???

Solution

09-25-2015
06:23 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-04-2015 01:21 PM

Identifying cycles can be tricky. High frequency cycle can be masked by an irregular component and low frequency cycle can get masked by a flexible trend. I am not sure why you are using two cycle statements. Do you think there are multiple cycles? UCM does permit you to control all aspects of cycle specification: rho=, variance= and period= options along with noest= parenthesized list gives you all the control (period specification is equivalent to frequency specification; period=2*Pi/frequency). Anyhow, here are some steps that might help in difficult cycle identification. All these steps try to reduce the flexibility of the trend component.

1. If the series level appears relatively constant, use constant trend: level variance=0 noest; No slope term.

2. If the series seems to have a fairly constant linear trend, use the line as a trend:

level variance=0 noest; slope variance=0 noest;

3. If the series has more complicated trend, use a smoother version:

level variance=0 noest; slope;

Start with just one cycle first.

UCM doc: SAS/ETS(R) 14.1 User's Guide

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-06-2015 03:10 AM

Thank you for your reply.

I start with plotting the data. The plot shows the presence of cycles. Closer scrutiny seems to suggest a cycle of around 9-11 years and a smaller one of 5-6 years (this matches the theoretical background of my research problem).

However when I use the **proc ucm** statement my estimates are incorrect (cycle periods are in hundreds and thousands!)

I have tried all the steps you have suggested (1 cycle, level variance=0 noest, level variance=0 noest; slope variance=0 noest and level variance=0 noest; slope). However my cycle estimates are still very large in one case it is 2222.

Could you suggest what step I can take?????

**(I tried to attach my data but the link did not work for me)**

Thank you for your help.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-06-2015 09:24 AM

Please send me your data. rajesh.selukar@sas.com