BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
aminkarimid
Lapis Lazuli | Level 10

Hello everybody;

I want to run panel regression with fix effect. So, I run the program below, but it doesn't work.

 

proc sort data=Sampledata_adjvol out=Sampledata_adjvol2;
	by TRD_STCK_CD TRD_EVENT_ROUFOR;
run;

proc panel data = Sampledata_adjvol2;
	model adjusted_volume_5 = TRD_EVENT_ROUFOR / fixone;
	id TRD_STCK_CD TRD_EVENT_ROUFOR;
run;

The error is:

ERROR: The data set WORK.SAMPLEDATA_ADJVOL2 is not sorted in ascending sequence with respect to the time series ID. The current time period has TRD_EVENT_ROUFOR=9:30:00 and the previous time period has
       TRD_EVENT_ROUFOR=9:30:00 in cross section TRD_STCK_CD=ABAD1.

Here is a sample of my data:

data WORK.SAMPLEDATA_ADJVOL;
  infile datalines dsd truncover;
  input TRD_STCK_CD:$15. TRD_EVENT_DT:DATE9. TRD_EVENT_ROUFOR:TIME8. adjusted_volume_5:32.;
  format TRD_EVENT_DT DATE9. TRD_EVENT_ROUFOR TIME8.;
  datalines4;
ABAD1,20MAY2008,9:30:00,
ABAD1,20MAY2008,9:30:00,
ABAD1,20MAY2008,9:30:00,0.1236593933
ABAD1,21MAY2008,9:30:00,0.5277625684
ABAD1,09JUL2008,9:30:00,0.0061432698
ABAD1,21JUL2008,10:30:00,2.4368321201
ABAD1,15OCT2008,10:30:00,
ABAD1,15OCT2008,10:30:00,
ABAD1,15OCT2008,11:00:00,0.1097571838
ABAD1,29APR2009,11:00:00,0.0274242661
SDFA1,20MAY2008,9:30:00,
SDFA1,20MAY2008,9:30:00,
SDFA1,20MAY2008,9:30:00,0.0236593933
SDFA1,21MAY2008,9:30:00,0.3277625684
SDFA1,09JUL2008,9:30:00,0.0061432698
SDFA1,21JUL2008,10:30:00,1.4368321201
SDFA1,15OCT2008,10:30:00,
SDFA1,15OCT2008,11:00:00,0.2097571838
SDFA1,29APR2009,11:00:00,0.0174242661
VAED2,20MAY2008,9:30:00,
VAED2,20MAY2008,9:30:00,0.0236593933
VAED2,21MAY2008,9:30:00,0.3277625684
VAED2,15OCT2008,11:00:00,0.2097571838
VAED2,29APR2009,11:00:00,0.0174242661
;;;;

How can I fix that?

Thanks in advance.

1 ACCEPTED SOLUTION
1 REPLY 1

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 3213 views
  • 0 likes
  • 2 in conversation