Data visualization with SAS programming

WARNING: The data for boxes is incomplete or invalid. Some boxes will not be drawn.

Reply
Trusted Advisor
Posts: 1,216

WARNING: The data for boxes is incomplete or invalid. Some boxes will not be drawn.

Hi,

 

I'm moving some SGPLOT code from 9.3 to 9.4M3, and I'm getting:

  WARNING: The data for boxes is incomplete or invalid. Some boxes will not be drawn.

 

I know I get the warning if there is a group with all missing values, e.g. below will generate it because y is always missing for group 1:

 

data a ;
  do group=1 to 5 ;
    do id=1 to 10 ;
      if group>=2 then y=ranuni(0) ;
      output  ;
    end  ;
  end ;
run ;

proc sgplot data=a ;
  vbox y / category=group ;
run ;

 

Are there any other conditions that would generate this warning?

 

I saw this note about a bug in 9.4M0 http://support.sas.com/kb/54/551.html, but it says it's fixed in M3, and indeed I could not replicate it when there is only 1 data point in a group.

 

I don't particularly like this warning.  And seems inconsistent that VBOX throws it, but VBAR does not throw an analagous warning.

 

proc sgplot data=a ;
  vbar group / response=y;
run ;

 

If it is only thrown when there is a group with all missing values, I will add it to my list of ignorable log warnings.

 

Thanks,

--Q.

Grand Advisor
Posts: 10,239

Re: WARNING: The data for boxes is incomplete or invalid. Some boxes will not be drawn.

How about sharing the data and actual code submitted.

When something sounds like a data issue then check the data.

 

Perhaps you are using a FREQ option and the value for the FREQ is missing for one or more records of the box variable

Have you tried using the option MISSING?

Trusted Advisor
Posts: 1,216

Re: WARNING: The data for boxes is incomplete or invalid. Some boxes will not be drawn.

Thanks @ballardw.  The code in my post  is the actual code submitted (it generates sample data, and then PROC SGPLOT makes the plot).  And in 9.4 M3, it throws the warning (does not in 9.3).

 

In that example, it throws the warning because there is one group where all values of the response value are missing.

 

My question is, are there any other circumstances in which that warning would be generated?

 

My side comment is that the warning doesn't seem very useful, and is not generated in other similar situations, such as the vbar chart.

 

 

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