BookmarkSubscribeRSS Feed
raqthesolid
Quartz | Level 8

I am trying to run proc panel model but having following issues;

 

1)


proc sort data=j; by gvkey datadate; run;
proc panel data=j ;
id GVKEY DATADATE;
model invest = TQ cfcon /fixtwo pooled;
run;

 

ERROR: Data set WORK.J is not sorted in ascending sequence with respect to time series ID. The
current time period has year=2015 and the previous time period has year=2015 in cross
section GVKEY=006506.

 

 

2)

proc sort data=j; by datadate; run;
proc panel data=j ;
id GVKEY DATADATE;
model invest = TQ cfcon /fixtwo pooled;
run;

 

ERROR: There is only one cross section or time series observation. Computations will be
terminated.

any way to correct these issues.

THanks

2 REPLIES 2
Christian5
SAS Employee

Hi Raqthesolid,

 

Depending on how the data set looks like, there might me a few reasons why you are not getting the answers you are looking for.

Regarding the first issue, could you verify that within the cross section GVKEY=006506 you only have one observation characterized by year=2015?

Concerning the second issue, could determine cross section you have? Essentially how mane distinct values do you have in GVKEY?

 

raqthesolid
Quartz | Level 8

Thanks for the reply. i tried the following code to make sure this thing.

proc sort data=j out=c NODUPKEY; by gvkey year; run;

my first problem has been solved. 

Regarding second thing there are about 5000 distinct GVKEY. 

i am usning following codes;

proc sort data=j; by gvkey datadate; run;
proc panel data=j ;
id GVKEY DATADATE;
model invest = TQ cfcon /fixtwo pooled;
run;

now i am getting this issue;


ERROR: There is only one cross section or time series observation. Computations will be
terminated.

 

any way to solve this thing. your efforts are always appreciated. 

ABdul 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 980 views
  • 0 likes
  • 2 in conversation