03-14-2013 11:42 AM
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;
ERROR: There is only one cross section or time series observation. Computations will be
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?
03-14-2013 01:35 PM
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.
11-09-2016 08:09 PM
I also experienced the same problem, but my problem was resolved by running the following code before proc panel program:
*Eliminate missing variables;
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;
*Ensure each gvkey must have at least 2 observations;
create table want as
select * from want
group by GVKEY having count(*)>= 2;
*sort the data according to gvkey and datadate;
proc sort data=want;
by gvkey datadate;
I hope this codes are useful.