BookmarkSubscribeRSS Feed
Quentin
Super User

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.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
2 REPLIES 2
ballardw
Super User

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?

Quentin
Super User

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.

 

 

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2572 views
  • 0 likes
  • 2 in conversation