How to estimate the model with sub samples?

For questions and discussion related to reading in and working with data.
researcher84
Posts: 19
Joined: Tue Feb 11, 2014 4:03 pm

How to estimate the model with sub samples?

Unread post by researcher84 »

Code: Select all

OPEN DATA "C:\data.xls"
CALENDAR(M) 1986:01
DATA(FORMAT=XLS,NOLABELS,ORG=COLUMNS) 1990:01 2013:07  cpi ip inflation 
* 
Is what I have above right? I assume this will run my model on the subsample 1990:01 to 2013:07. If not, how to run different subsamples with same program and data file ? my data has no lables, hopefully what I have above right. Thanks alot!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: How to estimate the model with sub samples?

Unread post by TomDoan »

Since you didn't attach the data set, I have no idea if it's correct.

If the file has dates on it (you can have dates and not labels, or vice versa), then you would probably want just

OPEN DATA "C:\data.xls"
CALENDAR(M) 1990:01
DATA(FORMAT=XLS,NOLABELS,ORG=COLUMNS) 1990:01 2013:07 cpi ip inflation

so if you don't want the 1986-1989 data, you just leave it out. If the file has no dates, then you have to do

OPEN DATA "C:\data.xls"
CALENDAR(M) 1986:01
DATA(FORMAT=XLS,NOLABELS,ORG=COLUMNS) 1986:01 2013:07 cpi ip inflation

If there are no dates on the data file, DATA assumes the first line corresponds to entry 1 on your CALENDAR. If your data set has no dates or labels, I would strongly suggest that you read it in once, and write a new version that includes both.

If you're stuck with the version with no dates and labels (if, for instance, it's being updated by someone else), then read it with the second set of instructions and just use the start and end parameters on a LINREG or whatever to restrict the range.
Post Reply