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