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

I am trying to use PROC PANEL for an unbalance data set. after receiving this error:

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

       terminated.

I did what is suggested here http://support.sas.com/kb/22/850.html to check my data set.

this is what I did

data x;

set panelanalysis;

x=tcIHUB  +LABvalue + RADIOvalue + TRANSvalue;

run;

proc print data=x (obs=10);

var tcIHUB  LABvalue RADIOvalue TRANSvalue x;

run;

          
Obs tcIHUB LABvalue RADIOvalue TRANSvalue x
  100100
  200200
  301000
  401000
  501000
  601000
  703000
  801000
  908100
  1009910

Strangely, I see that SAS does not do the summation correctly.all of the values of varia there is no error or warning about data type or anything else in the log.

I suspect that the same reason that makes the summation results to be incorect is casuing the error in PROC PANEL.

Any idea is greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
niam
Quartz | Level 8

The problem solved. it was due to OPTIONS SETMISS=0;

interestingly, if you have this option in SAS 9.3, the missing values in will be displayed as zeros but actually remain missing i the background and thus if you add them to another nonmissing variable the result will be missing, but shown as zeros in  the output.

there is no error or warning in log. I think SAS should consider this in their hotfixes or next versions

View solution in original post

4 REPLIES 4
SteveDenham
Jade | Level 19

This is just a guess, triggered by how the values for your four variables lined up in the print output.  Is it at all possible that these four variables are somehow character variables?

Steve Denham

niam
Quartz | Level 8

Steve; No they are all numeric variables.

But the point is that the very first data set, was created as an output from PROC TRANSPOSE with OPTIONS SETMISS=0; can that be the reason.

the thing which makes it more strange, is that when I ask SAS to print the observations with missing values, I get this result.

proc print data=x;

where missing(x) = 1;

var tcIHUB  LABvalue RADIOvalue TRANSvalue x;

run;

          
Obs tcIHUB LABvalue RADIOvalue TRANSvalue x
  100100
  200200
  301000
  401000
  501000
  601000
  703000
  801000
  908100
  1009910
apparently, SAS considered 0 as a missing value and since I have zeros in the first four column, then the summation shown in the last column missing, but somehow, instead of reporting missing values, they are reported as zero. I just gues this based on the SET MISS=0 option I had used in PROC TRANSPOSE. I am not sure
ballardw
Super User

Do you get the same behavior in Proc Print with: WHERE X = .;?

Did the log for your data step where you calculated X have any warnings or notes?

niam
Quartz | Level 8

The problem solved. it was due to OPTIONS SETMISS=0;

interestingly, if you have this option in SAS 9.3, the missing values in will be displayed as zeros but actually remain missing i the background and thus if you add them to another nonmissing variable the result will be missing, but shown as zeros in  the output.

there is no error or warning in log. I think SAS should consider this in their hotfixes or next versions

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1152 views
  • 0 likes
  • 3 in conversation