I'm looking for anyone who has been successful with this HREF option. The documentation is a little light on examples. As a result I'm guesssing at the supported structure of the dataset table.
My Statement is;
PROC SHEWHART DATA = WORK.WeeklyData;
IRCHART (Value) * WeekEnding /
My two data sets are set up as follows;
Function| WeekEnding | Value
< multiple rows or data typically 20+ weeks of data per function >
Function | _REF_
< one row of data per Function>
While this procedure executes I do not get a horizontal line representing the _REF_ value. I have tried to use the varibale name of _VAR_ unsuccessfully in the HREF_Data table with an error claiming the _VAR_ length exceeded 32 characters. Which of course it does not.
As I mentioned the supporting documentation is a little light as you can see from the extract included attached.
I don't see a lot of activity (one post) specific to SHEWHART usage, but perhaps that's because eveyoone else has it figured out!
You can specify the values for the lines with an HREF= list. If the subgroup variable is numeric, the values must be numeric. If the subgroup variable is character, the values must be quoted strings of up to 32 characters. If the subgroup variable is formatted, the values must be given as internal values.
Examples of HREF=values follow:
href=5 10 15 20 25 30
href='Shift 1' 'Shift 2' 'Shift 3'
You can specify the values for the lines as the values of a variable named _REF_ in an HREF= data set. The type and length of _REF_ must match those of the subgroup variable specified in the chart statement. Optionally, you can provide labels for the lines as values of a variable named _REFLAB_, which must be a character variable of length 16 or less. If you want distinct reference lines to be displayed in charts for different processes specified in the chart statement, you must include a character variable of length 32 or less named _VAR_, whose values are the processes. If you do not include the variable _VAR_, all of the lines are displayed in all of the charts.
Each observation in the HREF= data set corresponds to a reference line. If BY variables are used in the input data set (DATA=, HISTORY=, or TABLE=), the same BY variable structure must be used in the HREF= data set unless you specify the NOBYREF option.
Related options are CHREF=, HREFCHAR=, HREFLABELS=, HREFLABPOS=, LHREF=, and NOBYREF.
Using the ENGINES data from the Shewhart doc, I was able to make HREF=<sas dataset> work. Remember that the line for HREF specifies position of reference lines perpendicular to horizontal axis -- so the numbers that I specify correspond to the ID values where I want the lines to be drawn. Just as the VREF option specifies the position of reference lines perpendicular to vertical axis. The example below uses both HREF= and VREF= with the ENGINES data.
I understand completely! I have always thought they should have been named: larallel (because all the l's are parallel) and tertenticutar (because the cross on all the T's are perpendicular). But nobody ever asks me about making up words for things. Starting them with the same letter -- not the best idea!