BookmarkSubscribeRSS Feed
ChuckK
Calcite | Level 5
Hello Folks,

For SGPANEL, suppose I have two classification variables with missing combinations. How is the ordering for the levels determined when using the SPARSE option. I can see that the order depends on the pattern of missing and it's well behaved in most places.

Using sashelp.prdsale here's what I've done. (How much space do we have?) Here's the code

proc sgpanel data=prdsale;
panelby region product / sparse novarname columns=5;
hbar division / response=actual;
run;

EX1) Delete East x Chair and East x Sofa -- SOFA and CHAIR are the last two levels in the plot for EAST. Alphabetical within the not missing and missing. WEST follows EAST's pattern.

EX2) Delete East x Chair and West x Sofa -- The levels of PRODUCT are determined consistent with EX1 for EAST. WEST follows EAST's pattern. East x Chair is upper right. West x Sofa is bottom middle (under East x Sofa).

EX3) Keep deletions in EX2 and switch REGION and PRODUCT in the PANELBY statement. -- This one threw me. CHAIR comes before SOFA, so I would have thought that it's pattern of missing levels would have affected how the cells were laid out. But, now that I work this through here, my guess is that BED determined the order of REGION. Since BED had no missing combo's, REGION became EAST then WEST. And now testing that with

EX4) Delete East x Bed and West x Sofa -- all of the PRODUCT levels have WEST then EAST.

Okay, did I get it right? Anything else I should know about the ordering?

Thanks for your help. (Sorry for the long, thinking-out-loud post. 🙂

Chuck

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!

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.

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
  • 0 replies
  • 603 views
  • 0 likes
  • 1 in conversation