Split file and GGRAPH

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

Split file and GGRAPH

Guenter Marxen-2
Hello,

I use SPSS 17.0.1 under Win XP Pro (all patches) and make a simple barchart. Success.

After setting split file on (with a categorial var with numerical values 1, ...5, layered or separate), I get an "...GGRAPH ... unexpected error" and "This command not executed".

Is it not possible to use GGRAPH with split file on?

--

regards

Günter Marxen
University of Cologne

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Split file and GGRAPH

SPSS Support
Hello Gunter,

Are there cases with system missing or user missing values on the split file variable? A bug was filed for versions 16 and 17, as described in the resolution below my signature, where a system or user missing value on the split file variable would generate the error that you reported for the bar chart. The workaround listed there is to recode the missing value to a new valid value (i.e. not in the range 1-5 in your example) and then set that value to missing after the graph is drawn.
  In experimenting with this problem today in 17.0.1, I noticed that the error message only occurred when the missing value was the first split file value encountered in the data (as system missing would be after sorting on the split file value). When the split file values were the valid values 1 to 4 and the user missing value 9, the chart was drawn without error for split file groups 1 to 4 without recoding the 9 or turning off its user missing status. If you had 0 defined as user missing and these 0s were triggering the error, then the workaround command in the resolution:

Recode splitvar (missing = 0) .

would not help. Instead, you could either recode missing to a value higher than the valid range and designate that as missing or temporarily turn off the missing value status of 0. The latter choice would give you a graph for the (splitvar = 0) group.

You can turn off the user missing value designations for a variable in the Variable View or by using an empty set of parentheses in a missing value command, as in:

Missing values splitvar ().

You can rerun the Missing Values command with the user-defined missing values to reassign the missing values, as in:

Missing values splitvar(0).

  I hope this helps. The bug is expected to be fixed in SPSS 18.


David Matheson
SPSS Statistical Support

***************************
Resolution number: 82487  Created on: Mar 6 2009  Last Reviewed on: Mar 6 2009

Problem Subject:  Unexpected error when creating a simple bar chart with GGRAPH when a SPLIT FILE is active

Problem Description:  I am working with Statistics 16.0.x or 17.0.x and would like to create a simple bar chart for a variable e.g with 9 categories with Chart builder. I would like to have this chart separated by all categories of another categorical variable, therefore i have used the latter variable as split file variable e.g. with this syntax:
SORT CASES BY splitvar.
SPLIT FILE SEPARATE BY splitvar.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES= barvar COUNT()[name="COUNT"] MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: barvar =col(source(s), name("barvar"), unit.category())
DATA: COUNT=col(source(s), name("COUNT"))
GUIDE: axis(dim(1), label("Barchart Var"))
GUIDE: axis(dim(2), label("Percent"))
SCALE: cat(dim(1), include("1", "2", "3", "4", "5", "6", "7", "8", "9"))
SCALE: linear(dim(2), include(0))
ELEMENT: interval(position(summary.percent(barvar*COUNT, base.all(acrossPanels()))),
shape.interior(shape.square))
END GPL.

However, when I run this syntax I get the following error in the viewer and I do not know why this is?

"An unexpected error occurred while processing the GGRAPH command. The command will not be executed.
This command is not executed".



Resolution Subject: This problem has been reported to SPSS Development - Workaround Available. It is expected to be resolved with Statistics 18.

Resolution Description:
This problem has been reported to SPSS Development - Workaround Available. It is expected to be resolved with Statistics 18.
The problem is caused by the system (or user) defined missing values within your split file variable. As a workaround you can recode the missing value into a valid value and run the GGRAPH command again. Afterwards you can format the recoded value as missing value. We apologize for any inconvenience. In you example this would be:

RECODE splitvar (MISSING =0).
EXEC.
SORT CASES BY splitvar.
SPLIT FILE SEPARATE BY splitvar.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES= barvar COUNT()[name="COUNT"] MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: barvar =col(source(s), name("barvar"), unit.category())
DATA: COUNT=col(source(s), name("COUNT"))
GUIDE: axis(dim(1), label("Barchart Var"))
GUIDE: axis(dim(2), label("Percent"))
SCALE: cat(dim(1), include("1", "2", "3", "4", "5", "6", "7", "8", "9"))
SCALE: linear(dim(2), include(0))
ELEMENT: interval(position(summary.percent(barvar*COUNT, base.all(acrossPanels()))),
shape.interior(shape.square))
END GPL.
MISSING VALUES splitvar (0).





-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Guenter Marxen
Sent: Thursday, March 26, 2009 11:39 AM
To: [hidden email]
Subject: Split file and GGRAPH

Hello,

I use SPSS 17.0.1 under Win XP Pro (all patches) and make a simple barchart. Success.

After setting split file on (with a categorial var with numerical values 1, ...5, layered or separate), I get an "...GGRAPH ... unexpected error" and "This command not executed".

Is it not possible to use GGRAPH with split file on?

--

regards

Günter Marxen
University of Cologne

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Split file and GGRAPH

Guenter Marxen-2
In reply to this post by Guenter Marxen-2
Please,

couldt somebody give some hints how to make diagrams using SPLIT FILE? Many thanks in advance.

Am 26.03.2009 18:39 Uhr schrieb Guenter Marxen:
>Hello,
>
>I use SPSS 17.0.1 under Win XP Pro (all patches) and make a simple barchart. Success.
>
>After setting split file on (with a categorial var with numerical values 1, ...5, layered or separate), I get an "...GGRAPH ... unexpected error" and "This command not executed".
>
>Is it not possible to use GGRAPH with split file on?

--

regards

Günter Marxen
University of Cologne

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Split file and GGRAPH

SPSS Support
Hello Guenter,
  Here is the response that I posted on March 26. Check whether you have cases with user or system missing values on the split file variable. The resolution and notes below provide a workaround.

David Matheson
SPSS Statistical Support

__________________________

Hello Guenter,

Are there cases with system missing or user missing values on the split file variable? A bug was filed for versions 16 and 17, as described in the resolution below my signature, where a system or user missing value on the split file variable would generate the error that you reported for the bar chart. The workaround listed there is to recode the missing value to a new valid value (i.e. not in the range 1-5 in your example) and then set that value to missing after the graph is drawn.
  In experimenting with this problem today in 17.0.1, I noticed that the error message only occurred when the missing value was the first split file value encountered in the data (as system missing would be after sorting on the split file value). When the split file values were the valid values 1 to 4 and the user missing value 9, the chart was drawn without error for split file groups 1 to 4 without recoding the 9 or turning off its user missing status. If you had 0 defined as user missing and these 0s were triggering the error, then the workaround command in the resolution:

Recode splitvar (missing = 0) .

would not help. Instead, you could either recode missing to a value higher than the valid range and designate that as missing or temporarily turn off the missing value status of 0. The latter choice would give you a graph for the (splitvar = 0) group.

You can turn off the user missing value designations for a variable in the Variable View or by using an empty set of parentheses in a missing value command, as in:

Missing values splitvar ().

You can rerun the Missing Values command with the user-defined missing values to reassign the missing values, as in:

Missing values splitvar(0).

  I hope this helps. The bug is expected to be fixed in SPSS 18.


David Matheson
SPSS Statistical Support

***************************
Resolution number: 82487  Created on: Mar 6 2009  Last Reviewed on: Mar 6 2009

Problem Subject:  Unexpected error when creating a simple bar chart with GGRAPH when a SPLIT FILE is active

Problem Description:  I am working with Statistics 16.0.x or 17.0.x and would like to create a simple bar chart for a variable e.g with 9 categories with Chart builder. I would like to have this chart separated by all categories of another categorical variable, therefore i have used the latter variable as split file variable e.g. with this syntax:
SORT CASES BY splitvar.
SPLIT FILE SEPARATE BY splitvar.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES= barvar COUNT()[name="COUNT"] MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: barvar =col(source(s), name("barvar"), unit.category())
DATA: COUNT=col(source(s), name("COUNT"))
GUIDE: axis(dim(1), label("Barchart Var"))
GUIDE: axis(dim(2), label("Percent"))
SCALE: cat(dim(1), include("1", "2", "3", "4", "5", "6", "7", "8", "9"))
SCALE: linear(dim(2), include(0))
ELEMENT: interval(position(summary.percent(barvar*COUNT, base.all(acrossPanels()))),
shape.interior(shape.square))
END GPL.

However, when I run this syntax I get the following error in the viewer and I do not know why this is?

"An unexpected error occurred while processing the GGRAPH command. The command will not be executed.
This command is not executed".



Resolution Subject: This problem has been reported to SPSS Development - Workaround Available. It is expected to be resolved with Statistics 18.

Resolution Description:
This problem has been reported to SPSS Development - Workaround Available. It is expected to be resolved with Statistics 18.
The problem is caused by the system (or user) defined missing values within your split file variable. As a workaround you can recode the missing value into a valid value and run the GGRAPH command again. Afterwards you can format the recoded value as missing value. We apologize for any inconvenience. In you example this would be:

RECODE splitvar (MISSING =0).
EXEC.
SORT CASES BY splitvar.
SPLIT FILE SEPARATE BY splitvar.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES= barvar COUNT()[name="COUNT"] MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: barvar =col(source(s), name("barvar"), unit.category())
DATA: COUNT=col(source(s), name("COUNT"))
GUIDE: axis(dim(1), label("Barchart Var"))
GUIDE: axis(dim(2), label("Percent"))
SCALE: cat(dim(1), include("1", "2", "3", "4", "5", "6", "7", "8", "9"))
SCALE: linear(dim(2), include(0))
ELEMENT: interval(position(summary.percent(barvar*COUNT, base.all(acrossPanels()))),
shape.interior(shape.square))
END GPL.
MISSING VALUES splitvar (0).





-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Guenter Marxen
Sent: Tuesday, March 31, 2009 4:25 AM
To: [hidden email]
Subject: Re: Split file and GGRAPH

Please,

couldt somebody give some hints how to make diagrams using SPLIT FILE? Many thanks in advance.

Am 26.03.2009 18:39 Uhr schrieb Guenter Marxen:
>Hello,
>
>I use SPSS 17.0.1 under Win XP Pro (all patches) and make a simple barchart. Success.
>
>After setting split file on (with a categorial var with numerical values 1, ...5, layered or separate), I get an "...GGRAPH ... unexpected error" and "This command not executed".
>
>Is it not possible to use GGRAPH with split file on?

--

regards

Günter Marxen
University of Cologne

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD