GRAPH stacked bar syntax limitations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GRAPH stacked bar syntax limitations

Dennis Deck
I have a series of 8 scales with ordinal scores (values range from 0 to
3 representing recognition levels - see SPSS code below).  I would like
to display a summary profile consisting of stacked bars showing the
number of cases (schools) at each recognition level.  I would like to
break this down by one or more categorical variables.  I would also like
to produce variations such as the corresponding 100% stacked bars.

GRAPH syntax seems very limiting for stacked bars.  I can only get
appropriate stacked bars for two limited circumstances:
 a) one scale by one categorical variable
 b) one scale by two categorical variables (using /Panel)

I cannot produce:
 a) a profile for all 8 scales
 b) a profile for all 8 scales with panels by a categorical variable
 c) 100% stacked bars with the correct percentages (ie, within category)

 d) stacked bars which count for levels 1-3 but ignoring 0 (ie, not
reaching first recognition level)

My conclusion is that the syntax is just too limiting.  It appears that
I can only use the manual method:  use CTABLES to get the summary counts
or percentages and paste these into Powerpoint after a little editing.
My questions are:
 a) Have I overlooked any tricks to using GRAPH?
 b) Do GGRAPH or IGRAPH provide any additional capability? (my quick
examination suggests not)


*********************** .
*** Data Definition *** .
*********************** .

VARIABLE LEVEL rPolicy rMeals rFoods rHlthEd rPhysEd
               rPhysAct rAftrSch rStaff rTotal (ORDINAL) .
VARIABLE LEVEL Level4 Pilot LowSES Ethnic Size  (NOMINAL).

VARIABLE LABELS
  rPolicy  'Policy'
 /rMeals   'Reimbursable Meals'
 /rFoods   'Competitive Foods'
 /rHlthEd  'Health Education'
 /rPhysEd  'Physical Education'
 /rPhysAct 'Physical Activity'
 /rAftrSch 'After School'
 /rStaff   'Staff Wellness'
 /rTotal   'Total (overall level)' .

VALUE LABELS
 rPolicy rMeals   rFoods   rHlthEd
 rPhysEd rPhysAct rStaff  rAftrSch rTotal
  0 'No level'
  1 'Bronze'
  2 'Silver'
  3 'Gold' .

********************** .
*** Display Charts *** .
********************** .

* one scale by one categorical variable .
GRAPH /Bar(Stacked)= COUNT BY Level BY rPolicy  .

* one scale by two categorical variables .
GRAPH /Bar(Stacked)= COUNT BY Level BY rPolicy
  /Panel RowVar= LowSES .



Dennis Deck, PhD
RMC Research Corporation
111 SW Columbia Street, Suite 1200
Portland, Oregon 97201-5843
voice: 503-223-8248 x715
voice: 800-788-1887 x715
fax:  503-223-8248
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: GRAPH stacked bar syntax limitations

Beadle, ViAnn
This is definitely a ggraph problem and will take a bit of exploration or requires you do some data management to start re-arranging if you want to use the ancient GRAPH command.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Dennis Deck
Sent: Tuesday, February 20, 2007 3:54 PM
To: [hidden email]
Subject: GRAPH stacked bar syntax limitations

I have a series of 8 scales with ordinal scores (values range from 0 to
3 representing recognition levels - see SPSS code below).  I would like
to display a summary profile consisting of stacked bars showing the
number of cases (schools) at each recognition level.  I would like to
break this down by one or more categorical variables.  I would also like
to produce variations such as the corresponding 100% stacked bars.

GRAPH syntax seems very limiting for stacked bars.  I can only get
appropriate stacked bars for two limited circumstances:
 a) one scale by one categorical variable
 b) one scale by two categorical variables (using /Panel)

I cannot produce:
 a) a profile for all 8 scales
 b) a profile for all 8 scales with panels by a categorical variable
 c) 100% stacked bars with the correct percentages (ie, within category)

 d) stacked bars which count for levels 1-3 but ignoring 0 (ie, not
reaching first recognition level)

My conclusion is that the syntax is just too limiting.  It appears that
I can only use the manual method:  use CTABLES to get the summary counts
or percentages and paste these into Powerpoint after a little editing.
My questions are:
 a) Have I overlooked any tricks to using GRAPH?
 b) Do GGRAPH or IGRAPH provide any additional capability? (my quick
examination suggests not)


*********************** .
*** Data Definition *** .
*********************** .

VARIABLE LEVEL rPolicy rMeals rFoods rHlthEd rPhysEd
               rPhysAct rAftrSch rStaff rTotal (ORDINAL) .
VARIABLE LEVEL Level4 Pilot LowSES Ethnic Size  (NOMINAL).

VARIABLE LABELS
  rPolicy  'Policy'
 /rMeals   'Reimbursable Meals'
 /rFoods   'Competitive Foods'
 /rHlthEd  'Health Education'
 /rPhysEd  'Physical Education'
 /rPhysAct 'Physical Activity'
 /rAftrSch 'After School'
 /rStaff   'Staff Wellness'
 /rTotal   'Total (overall level)' .

VALUE LABELS
 rPolicy rMeals   rFoods   rHlthEd
 rPhysEd rPhysAct rStaff  rAftrSch rTotal
  0 'No level'
  1 'Bronze'
  2 'Silver'
  3 'Gold' .

********************** .
*** Display Charts *** .
********************** .

* one scale by one categorical variable .
GRAPH /Bar(Stacked)= COUNT BY Level BY rPolicy  .

* one scale by two categorical variables .
GRAPH /Bar(Stacked)= COUNT BY Level BY rPolicy
  /Panel RowVar= LowSES .



Dennis Deck, PhD
RMC Research Corporation
111 SW Columbia Street, Suite 1200
Portland, Oregon 97201-5843
voice: 503-223-8248 x715
voice: 800-788-1887 x715
fax:  503-223-8248
[hidden email]