I am trying to run a proc panel data model but I am encountering a problem. Here is the code I have right now:
data have; input ID date indepvar depvar; datalines; 10001 02-02-2017 100 87 10001 02-06-2017 80 87 10001 02-08-2017 110 88 10002 02-05-2017 70 67 10002 02-08-2017 90 68 10002 02-011-2017 140 68 ; run; proc panel data = have; id ID date; model indepvar = depvar / FIXTWO; run;
When I run the above regression, I get the error:
There is only one cross section or time series observation. Computations will be terminated
There are no missing values in any of the variables and I have only selected date values with ≥2 observations.
I have searched this forum and there are others who have encountered this problem, but none of the solutions given solved the error. How should I arrange my data for the proc panel so that I do not face the above error?
Suggest: copy the data and code from that example and then remove ONE record for ONE firm and see the result.
Note that your example data does not run as you did not provide an informat for date that would work for the given code. All values would have generated errors of invalid data for date. And even with an appropriate informat
10002 02-011-2017 140 68 would be an error because either mmddyy10 or ddmmyy10 would choke on the 3 digit middle value.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.