Forecasting using SAS Forecast Server, SAS/ETS, and more

Panel data- weird error message

Reply
Contributor
Posts: 23

Panel data- weird error message

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?

Respected Advisor
Posts: 2,655

Re: Proc panel

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

Regular Contributor
Posts: 162

Re: Panel data- weird error message

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

 

Ask a Question
Discussion stats
  • 2 replies
  • 1491 views
  • 0 likes
  • 3 in conversation