BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
econfkw
Calcite | Level 5

I'm running a very simply proc panel procedure.
proc panel data=combine2 plots=none;
id gvkey datadate;
random_full:model res1 = win loss fb bjk gs national fbwin bjkwin gswin fbloss bjkloss gsloss/ ranone hccme=1;
run;

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

The whole sample period is 7/1/1999-6/30/2011

When the sample is restricted to 1/1/2002-6/30/2011, it works.

So the problem is 7/1/1999-12/31/2011. I'm attaching the data, what can possibly go wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
mspak
Quartz | Level 8

I also experienced the same problem, but my problem was resolved by running the following code before proc panel program:

 

*Eliminate missing variables;

DATA WANT;
SET combine2;

IF win  = . THEN DELETE;

IF loss  = . THEN DELETE;

IF fb  = . THEN DELETE;
IF bjk  = . THEN DELETE;
IF gs  = . THEN DELETE;
IF national  = . THEN DELETE;
IF fbwin  = . THEN DELETE;

bjkwin= . THEN DELETE;

gswin= . THEN DELETE;

fbloss= . THEN DELETE;

bjkloss= . THEN DELETE;

gsloss= . THEN DELETE;
IF GVKEY = . THEN DELETE;
IF datadate = . THEN DELETE;
RUN;

 

*Ensure each gvkey must have at least 2 observations;

proc sql;
create table want as
select * from want
group by GVKEY having count(*)>= 2;

quit;

 

*sort the data according to gvkey and datadate;

proc sort data=want;
by gvkey datadate;
run;

 

I hope this codes are useful.

 

Good luck.

 

Regards,

MSPAK

 

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

See the Troubleshooting page under Details: PANEL PROCEDURE in the documentation.

"Some guidelines need to be followed when you use PROC PANEL for analysis. For each cross section, PROC PANEL requires at least two time series observations with nonmissing values for all model variables. There should be at least two cross sections for each time point in the data. If these two conditions are not met, then an error message is printed in the log stating that there is only one cross section or time series observation and further computations will be terminated"

The sparsity of your predictors, and the multitude of missing dates are what lead to this problem, I think.

Moving this discussion to the Forecasting forum would probably lead to some interesting comments.

Steve Denham

mspak
Quartz | Level 8

I also experienced the same problem, but my problem was resolved by running the following code before proc panel program:

 

*Eliminate missing variables;

DATA WANT;
SET combine2;

IF win  = . THEN DELETE;

IF loss  = . THEN DELETE;

IF fb  = . THEN DELETE;
IF bjk  = . THEN DELETE;
IF gs  = . THEN DELETE;
IF national  = . THEN DELETE;
IF fbwin  = . THEN DELETE;

bjkwin= . THEN DELETE;

gswin= . THEN DELETE;

fbloss= . THEN DELETE;

bjkloss= . THEN DELETE;

gsloss= . THEN DELETE;
IF GVKEY = . THEN DELETE;
IF datadate = . THEN DELETE;
RUN;

 

*Ensure each gvkey must have at least 2 observations;

proc sql;
create table want as
select * from want
group by GVKEY having count(*)>= 2;

quit;

 

*sort the data according to gvkey and datadate;

proc sort data=want;
by gvkey datadate;
run;

 

I hope this codes are useful.

 

Good luck.

 

Regards,

MSPAK

 

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

Discussion stats
  • 2 replies
  • 3600 views
  • 0 likes
  • 3 in conversation