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
- /
- GMM- Data set is not sorted in ascending sequence ...

- 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

04-22-2014 12:31 PM

Hello everyone,

I have a question regarding GMM estimation with SAS.

I sorted my data and ran the GMM estimation but I am still getting an error message. I made sure that the time series is the same for all contracts.

Here is my model:

proc sort data=s_basint15;

by date cnt int;

run;

proc panel data =s_basint15 plot(unpackpanel)=all;

id cnt int;

model BASw = tod1-tod33 /gmm twostep maxband=5 nolevels noint;

run;

And here is the error I am getting back

Data set WORK.S_BASINT15 is not sorted in ascending sequence with respect to time

series ID. The current time period has int=1 and the previous time period has int=1 in

cross section cnt=ABE.

I included a picture of my data.

Thank you all for your precious help.

Accepted Solutions

Solution

07-07-2017
09:01 AM

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

04-22-2014 12:58 PM

This is the issue (as above):

The current time period has int=1 and the previous time period has int=1 in

cross section cnt=ABE.

Also looks like you may have duplicate ID's? Check the data for that timepoint.

data test;

set have;

where cnt='ABE' and int=1;

run;

All Replies

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

04-22-2014 12:35 PM

Change your sort to

proc sort data=s_basint15;

by cnt int date;

run;

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

04-22-2014 12:42 PM

Hello Reeza,

Thanks for your suggestion but I tried sorting my data by cnt int date but it is always bringing back the same error!

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

04-22-2014 12:45 PM

Post the full log when sorted with my suggestion above please.

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

04-22-2014 12:49 PM

The current time period has int=1 and the previous time period has int=1 in

cross section cnt=ABE.

Also looks like you may have duplicate ID's?

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

04-22-2014 12:52 PM

Here you go:

707 proc sort data=s_basint15;

708 by cnt int date;

709 run;

NOTE: There were 70884 observations read from the data set WORK.S_BASINT15.

NOTE: The data set WORK.S_BASINT15 has 70884 observations and 43 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 1.88 seconds

cpu time 0.39 seconds

710 proc panel data =s_basint15 plot(unpackpanel)=all;

711 id cnt int;

712 model BASw = tod1-tod33 /gmm twostep maxband=5 nolevels noint;

713 run;

NOTE: GMM has been requested without an associated instruments statement. PROC PANEL will

estimate under the assumptions of strict exogeneity and non-correlatedness in the right

hand side variables.

ERROR: Data set WORK.S_BASINT15 is not sorted in ascending sequence with respect to time

series ID. The current time period has int=1 and the previous time period has int=1 in

cross section cnt=ABE.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE PANEL used (Total process time):

real time 0.02 seconds

cpu time 0.01 seconds

Solution

07-07-2017
09:01 AM

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

04-22-2014 12:58 PM

This is the issue (as above):

The current time period has int=1 and the previous time period has int=1 in

cross section cnt=ABE.

Also looks like you may have duplicate ID's? Check the data for that timepoint.

data test;

set have;

where cnt='ABE' and int=1;

run;

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

04-22-2014 01:04 PM

I am not sure what you mean by duplicate ID's. Could you please explain?

I have intraday data so the time series int =1 to 33 is repeated in different days for each contracts.

Would that be the problem?

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

04-22-2014 01:58 PM

I think so.

You can test it by removing duplicates or adding another variable to uniquely identify a timepoint.

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

04-22-2014 02:57 PM

Thank you a lot for your help, Reeza!

How do you suggest I create a variable to uniquely identify a timepoint??

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

04-29-2014 05:46 PM

Hello Reeza,

I create a variable that combines both contracts and dates (I hope this is what you meant by uniquely identifying a timepoint) and I ran the GMM.

However, I still get an error message. Do I need to have an instrument variable??

Here a copy of the log:

246 proc panel data =s_basint15;

247 id cntd int;

248 model BASw = tod1-tod33 /gmm twostep maxband=5 nolevels noint;

249 run;

NOTE: GMM has been requested without an associated instruments statement. PROC PANEL will

estimate under the assumptions of strict exogeneity and non-correlatedness in the right

hand side variables.

ERROR: The required statement INSTRUMENTS is missing for the model . This model will be

skipped.

NOTE: PROCEDURE PANEL used (Total process time):

real time 0.15 seconds

cpu time 0.14 seconds

Thank you very much for your help.

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

04-30-2014 10:25 AM

Hello -

This example may be useful: http://support.sas.com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_panel_sect054....

Thanks,

Udo