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
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?
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
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.