Value Label problem

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

Value Label problem

Bob Schacht-3
I have two variables that are almost identical in format
    * Employment status at application (EMPSTAT), Numeric width = 2
    * Employment status at closure (CLOEMPST), Numeric, width = 1

I use the following VALUE LABELS command:

VALUE LABELS
      CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
employment' 3 'Self-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with supports, integrated'/
      EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
3 'Self-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with supports, integrated'
             8 'Secondary Student' 9 'Other students' 10 'Trainee or
Intern' 11 'Other Not employed'/
      SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
'Public support' '4' 'All other'/.

With the following result that looks peculiar to me:

 >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
 >name will be ignored.

 >The error is associated with 'VALUE'

      CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
employment' 3 'S
    elf-Employed (not BEP)'

 >Warning # 4474.  Command name: VALUE LABELS
 >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
 >name will be ignored.

 >The error is associated with 'LABELS'

             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with sup
    ports, integrated'/
      EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
3 'Se
    lf-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with sup
    ports, integrated'
             8 'Secondary Student' 9 'Other students' 10 'Trainee or
Intern' 11 '
    Other Not employed'/
      SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
'Public s
    upport' '4' 'All other'/.

The syntax editor is recognizing a VALUE LABELS command, but then parses
"VALUE" and "LABELS" separately and is parsing the line in a way that I
find baffling. I would be grateful to the one who explains my error to me.
What am I not seeing?

Thanks,
Bob Schacht

Robert M. Schacht, Ph.D. <[hidden email]>
Pacific Basin Rehabilitation Research & Training Center
1268 Young Street, Suite #204
Research Center, University of Hawaii
Honolulu, HI 96814

=====================
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: Value Label problem

ViAnn Beadle
So what is the prior command to this. Is it a VALUE LABELS command and is it
terminated with a period?

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bob
Schacht
Sent: Wednesday, December 05, 2007 7:51 PM
To: [hidden email]
Subject: Value Label problem

I have two variables that are almost identical in format
    * Employment status at application (EMPSTAT), Numeric width = 2
    * Employment status at closure (CLOEMPST), Numeric, width = 1

I use the following VALUE LABELS command:

VALUE LABELS
      CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
employment' 3 'Self-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with supports, integrated'/
      EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
3 'Self-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with supports, integrated'
             8 'Secondary Student' 9 'Other students' 10 'Trainee or
Intern' 11 'Other Not employed'/
      SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
'Public support' '4' 'All other'/.

With the following result that looks peculiar to me:

 >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
 >name will be ignored.

 >The error is associated with 'VALUE'

      CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
employment' 3 'S
    elf-Employed (not BEP)'

 >Warning # 4474.  Command name: VALUE LABELS
 >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
 >name will be ignored.

 >The error is associated with 'LABELS'

             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with sup
    ports, integrated'/
      EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
3 'Se
    lf-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with sup
    ports, integrated'
             8 'Secondary Student' 9 'Other students' 10 'Trainee or
Intern' 11 '
    Other Not employed'/
      SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
'Public s
    upport' '4' 'All other'/.

The syntax editor is recognizing a VALUE LABELS command, but then parses
"VALUE" and "LABELS" separately and is parsing the line in a way that I
find baffling. I would be grateful to the one who explains my error to me.
What am I not seeing?

Thanks,
Bob Schacht

Robert M. Schacht, Ph.D. <[hidden email]>
Pacific Basin Rehabilitation Research & Training Center
1268 Young Street, Suite #204
Research Center, University of Hawaii
Honolulu, HI 96814

=====================
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: Value Label problem

Burleson,Joseph A.
In reply to this post by Bob Schacht-3
Bob:

Are SUPPORT and CLOSSUPP string variables? If not, then the numeric
values associated with them (1 through 4) should NOT be in parentheses,
only the values, just like the first two variables, EMPSTAT and
CLOEMPST; that portion of the VALUE LABEL segment should read instead:

SUPPORT CLOSSUPP 1 'Personal Income' 2 'Family & Friends' 3 'Public
support' 4 'All other'/.

The first two variables look correct to me.

Joe Burleson

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bob Schacht
Sent: Wednesday, December 05, 2007 9:51 PM
To: [hidden email]
Subject: Value Label problem

I have two variables that are almost identical in format
    * Employment status at application (EMPSTAT), Numeric width = 2
    * Employment status at closure (CLOEMPST), Numeric, width = 1

I use the following VALUE LABELS command:

VALUE LABELS
      CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
employment' 3 'Self-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with supports, integrated'/
      EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended
employment'
3 'Self-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with supports, integrated'
             8 'Secondary Student' 9 'Other students' 10 'Trainee or
Intern' 11 'Other Not employed'/
      SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
'Public support' '4' 'All other'/.

With the following result that looks peculiar to me:

 >The (ADD) VALUE LABELS command specifies an unknown variable name.
The
 >name will be ignored.

 >The error is associated with 'VALUE'

      CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
employment' 3 'S
    elf-Employed (not BEP)'

 >Warning # 4474.  Command name: VALUE LABELS
 >The (ADD) VALUE LABELS command specifies an unknown variable name.
The
 >name will be ignored.

 >The error is associated with 'LABELS'

             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with sup
    ports, integrated'/
      EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended
employment'
3 'Se
    lf-Employed (not BEP)'
             4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
with sup
    ports, integrated'
             8 'Secondary Student' 9 'Other students' 10 'Trainee or
Intern' 11 '
    Other Not employed'/
      SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
'Public s
    upport' '4' 'All other'/.

The syntax editor is recognizing a VALUE LABELS command, but then parses
"VALUE" and "LABELS" separately and is parsing the line in a way that I
find baffling. I would be grateful to the one who explains my error to
me.
What am I not seeing?

Thanks,
Bob Schacht

Robert M. Schacht, Ph.D. <[hidden email]>
Pacific Basin Rehabilitation Research & Training Center
1268 Young Street, Suite #204
Research Center, University of Hawaii
Honolulu, HI 96814

=====================
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: Value Label problem

Bob Schacht-3
In reply to this post by ViAnn Beadle
At 04:57 PM 12/5/2007, ViAnn Beadle wrote:
>So what is the prior command to this. Is it a VALUE LABELS command and is it
>terminated with a period?

Good thought, but in this case, I ran the command isolated-- there was no
prior command. That is, I highlighted those lines of my syntax file, and
from the menu chose "Run/selection".

However, I did notice that as SPSS was running the command, the highlighted
portion of the file briefly expanded to include the previous 10 lines or
so, and then shrunk back to the originally highlighted lines. Does that
mean that even though those lines were not selected by me, they were run
anyway? I'll look tomorrow when I'm back at work and can see the file again.

Thanks,
Bob


>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bob
>Schacht
>Sent: Wednesday, December 05, 2007 7:51 PM
>To: [hidden email]
>Subject: Value Label problem
>
>I have two variables that are almost identical in format
>     * Employment status at application (EMPSTAT), Numeric width = 2
>     * Employment status at closure (CLOEMPST), Numeric, width = 1
>
>I use the following VALUE LABELS command:
>
>VALUE LABELS
>       CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
>employment' 3 'Self-Employed (not BEP)'
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with supports, integrated'/
>       EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
>3 'Self-Employed (not BEP)'
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with supports, integrated'
>              8 'Secondary Student' 9 'Other students' 10 'Trainee or
>Intern' 11 'Other Not employed'/
>       SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
>'Public support' '4' 'All other'/.
>
>With the following result that looks peculiar to me:
>
>  >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
>  >name will be ignored.
>
>  >The error is associated with 'VALUE'
>
>       CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
>employment' 3 'S
>     elf-Employed (not BEP)'
>
>  >Warning # 4474.  Command name: VALUE LABELS
>  >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
>  >name will be ignored.
>
>  >The error is associated with 'LABELS'
>
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with sup
>     ports, integrated'/
>       EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
>3 'Se
>     lf-Employed (not BEP)'
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with sup
>     ports, integrated'
>              8 'Secondary Student' 9 'Other students' 10 'Trainee or
>Intern' 11 '
>     Other Not employed'/
>       SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
>'Public s
>     upport' '4' 'All other'/.
>
>The syntax editor is recognizing a VALUE LABELS command, but then parses
>"VALUE" and "LABELS" separately and is parsing the line in a way that I
>find baffling. I would be grateful to the one who explains my error to me.
>What am I not seeing?
>
>Thanks,
>Bob Schacht
>
>Robert M. Schacht, Ph.D. <[hidden email]>
>Pacific Basin Rehabilitation Research & Training Center
>1268 Young Street, Suite #204
>Research Center, University of Hawaii
>Honolulu, HI 96814
>
>=====================
>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: Value Label problem

Fry, Jonathan B.
That brief selection expansion means SPSS ran those extra lines.

The syntax editor's Run command tries to run all the lines of any selected commands, so it scans up to find the end of the previous command, and scans down to find the end of the command in which your selection ends.  It expands the selection to include any extra text it's going to run, runs it, and then restores the selection.  So you can be sloppy about your selection (you can, for example, just click in the middle of a single command you want to run), but not about your punctuation.

Jonathan Fry
SPSS Inc.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bob Schacht
Sent: Thursday, December 06, 2007 12:06 AM
To: [hidden email]
Subject: Re: Value Label problem

At 04:57 PM 12/5/2007, ViAnn Beadle wrote:
>So what is the prior command to this. Is it a VALUE LABELS command and is it
>terminated with a period?

Good thought, but in this case, I ran the command isolated-- there was no
prior command. That is, I highlighted those lines of my syntax file, and
from the menu chose "Run/selection".

However, I did notice that as SPSS was running the command, the highlighted
portion of the file briefly expanded to include the previous 10 lines or
so, and then shrunk back to the originally highlighted lines. Does that
mean that even though those lines were not selected by me, they were run
anyway? I'll look tomorrow when I'm back at work and can see the file again.

Thanks,
Bob


>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bob
>Schacht
>Sent: Wednesday, December 05, 2007 7:51 PM
>To: [hidden email]
>Subject: Value Label problem
>
>I have two variables that are almost identical in format
>     * Employment status at application (EMPSTAT), Numeric width = 2
>     * Employment status at closure (CLOEMPST), Numeric, width = 1
>
>I use the following VALUE LABELS command:
>
>VALUE LABELS
>       CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
>employment' 3 'Self-Employed (not BEP)'
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with supports, integrated'/
>       EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
>3 'Self-Employed (not BEP)'
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with supports, integrated'
>              8 'Secondary Student' 9 'Other students' 10 'Trainee or
>Intern' 11 'Other Not employed'/
>       SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
>'Public support' '4' 'All other'/.
>
>With the following result that looks peculiar to me:
>
>  >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
>  >name will be ignored.
>
>  >The error is associated with 'VALUE'
>
>       CLOEMPST 1 'Employed, no supports, integrated' 2 'Extended
>employment' 3 'S
>     elf-Employed (not BEP)'
>
>  >Warning # 4474.  Command name: VALUE LABELS
>  >The (ADD) VALUE LABELS command specifies an unknown variable name.  The
>  >name will be ignored.
>
>  >The error is associated with 'LABELS'
>
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with sup
>     ports, integrated'/
>       EMPSTAT 1 'Employed, no supports, integrated' 2 'Extended employment'
>3 'Se
>     lf-Employed (not BEP)'
>              4 'BEP' 5 'Homemaker' 6 'Unpaid Family Worker'  7 'Employed
>with sup
>     ports, integrated'
>              8 'Secondary Student' 9 'Other students' 10 'Trainee or
>Intern' 11 '
>     Other Not employed'/
>       SUPPORT CLOSSUPP '1' 'Personal Income' '2' 'Family & Friends' '3'
>'Public s
>     upport' '4' 'All other'/.
>
>The syntax editor is recognizing a VALUE LABELS command, but then parses
>"VALUE" and "LABELS" separately and is parsing the line in a way that I
>find baffling. I would be grateful to the one who explains my error to me.
>What am I not seeing?
>
>Thanks,
>Bob Schacht
>
>Robert M. Schacht, Ph.D. <[hidden email]>
>Pacific Basin Rehabilitation Research & Training Center
>1268 Young Street, Suite #204
>Research Center, University of Hawaii
>Honolulu, HI 96814
>
>=====================
>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

=====================
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: Value Label problem

Bob Schacht-3
In reply to this post by Bob Schacht-3
At 04:03 AM 12/6/2007, ViAnn Beadle wrote:

>SPSS always select all of a command that it part of the current selection.
>No terminator on the prior command means that it is part of the current
>command. The way to avoid this problem in the presence of missing command
>terminators is to place blank lines between your commands because they are
>also command terminators and so much more obvious than periods.
>
>From: Bob Schacht [mailto:[hidden email]]
>Sent: Wednesday, December 05, 2007 11:06 PM
>To: ViAnn Beadle; [hidden email]
>Subject: RE: Value Label problem
>
>At 04:57 PM 12/5/2007, ViAnn Beadle wrote:
>
>So what is the prior command to this. Is it a VALUE LABELS command and is it
>terminated with a period?

ViAnn was right again.
The previous command was another VALUE LABELS command that had not been
closed with a period or blank line. Therefore when the processor looked
back (which I didn't realize it would do) and oriented itself in the
context of the previous command, but then saw the new VALUE LABELS command,
it saw it as a variable name rather than as a command, which is exactly
what the error output indicates.

The other key point here was made by Jonathan Fry, who pointed out that
>The syntax editor's Run command tries to run all the lines of any selected
>commands, so it scans up to find the end of the previous command, and
>scans down to find the end of the command in which your selection
>ends.  It expands the selection to include any extra text it's going to
>run, runs it, and then restores the selection.

I did not realize that it did this, so I'm glad that I noticed the apparent
brief backward look, and Jonathan pointed out its meaning. I lerns me
somthin knew evry day, when I  pay attenshun and have smart folks around
like the ones on this list!
:~)

Thanks!
Bob

=====================
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