I run a syntax based on OMS Control Panel utility. Extract from syntax below.
First I build a new dataset. Then I run the Graph Builder on the new dataset.
The strange thing that happens is that the first run of this syntax results in an error: "Cannot combine category and number types for items 'Mean' and 'null' "
However, when I try to run the same syntax again (20 seconds later), it passes and creates the graph.
What is happening here?
* Store mean score and standard deviation in a separate dataset to be exploited in next step to build a scatter plot.
DATASET DECLARE InputfromOutput.
OMS
/SELECT TABLES
/IF COMMANDS=['Descriptives'] SUBTYPES=['Descriptive Statistics']
/DESTINATION FORMAT=SAV NUMBERED=TableNumber_
OUTFILE='InputfromOutput' VIEWER=YES
/TAG='Mean_StDev'.
DESCRIPTIVES VARIABLES=VE01 VE02 VE03 VA01 VA02 VR02 VR01 VB01 VB02 VW01 VW03 VM01 VM02 VV04 VV03
VC01 VC02 VI01 VI02 VI03 VI04 VL01 VL02 VL03 VL04 VN01 VN02 VN04 VN03 VP01 VF01 VF02 VV01 VN05 VC03
VV02 VT02 VT03 VT05
/STATISTICS=MEAN STDDEV
/SORT=MEAN (D).
OMSEND tag='Mean_StDev'.
* Plotting the mean against the standard deviation.
* Chart Builder.
DATASET ACTIVATE InputfromOutput.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=Mean Std.Deviation[name="Std_Deviation"]
MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE
/FITLINE TOTAL=NO SUBGROUP=NO
/FRAME OUTER=NO INNER=NO
/GRIDLINES XAXIS=NO YAXIS=NO.
BEGIN GPL
GUIDE: axis(dim(1), label("Mean"))
GUIDE: axis(dim(2), label("Std. Deviation"))
GUIDE: text.title(label("Scatter Plot of Std. Deviation by Mean"))
SCALE: linear(dim(1), min(3.00), max(4.50))
SCALE: linear(dim(2), min(0.75), max(1.50), reverse())
ELEMENT: point(position(Mean*Std_Deviation))
END GPL.
------------------------------
Jos Blykers
------------------------------