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
ChristianMac
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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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