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?
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
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
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.