change in default VARIABLE LEVEL after upgrade

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

change in default VARIABLE LEVEL after upgrade

Albert-Jan Roskam
Hi,
 
We upgraded from SPSS v14 to SPSS v20 and experience a version difference in conjunction with the NVALID function of CTABLES.
In SPSS v14, VARIABLE LEVEL y (SCALE) did not need to precede CTABLES, whereas in SPSS v20 this is required. The default measurement
level has changed from SCALE (SPSS v14) to NOMINAL (SPSS v20). Is there a way to get the old behavior back? I cannot find  a SET function
that does this.
 
data list free / x (f).
begin data
1 2 3
end data.
compute y = 1.
execute.
begin program python.
import spssaux
print dict([(v.VariableName, v.VariableLevel) for v in spssaux.VariableDict()])
# under SPSS v14 prints:  {'y': 'scale', 'x': 'scale'}
# under SPSS v20 prints:  {'y': 'nominal', 'x': 'nominal'}
end program.
variable level y (scale). /* <---- required in SPSS v20, not in SPSS v14.
ctables /table x by y  [validn '' F6.1].
Thanks in advance!
 
Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Reply | Threaded
Open this post in threaded view
|

Re: change in default VARIABLE LEVEL after upgrade

Rick Oliver-3
The difference for Y is that in version 14, any new numeric variable created by a transformation was treated as scale. The behavior was changed to be smarter about that and apply the same rules to new variables as those applied to existing variables. Prior to version 19 (or 18?) the only rule that mattered was SET SCALEMIN, but now there are numerous other factors that are evaluated prior to the looking at the number of unique values. These rules are defined here:

http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/topic/com.ibm.spss.statistics.help/dataedit_define_variable_measurement.htm

But I think the only solution for this particular problem is to either explicitly change the measurement level (as in your example) or tell CTABLES to treat it as scale.




Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]
Phone: 312.893.4922 | T/L: 206-4922




From:        Albert-Jan Roskam <[hidden email]>
To:        [hidden email]
Date:        06/06/2012 04:16 AM
Subject:        change in default VARIABLE LEVEL after upgrade
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi,
 
We upgraded from SPSS v14 to SPSS v20 and experience a version difference in conjunction with the NVALID function of CTABLES.
In SPSS v14, VARIABLE LEVEL y (SCALE) did not need to precede CTABLES, whereas in SPSS v20 this is required. The default measurement
level has changed from SCALE (SPSS v14) to NOMINAL (SPSS v20). Is there a way to get the old behavior back? I cannot find  a SET function
that does this.
 
data list free / x (f).
begin data
1 2 3
end data.
compute y = 1.
execute.

begin program python.
import spssaux
print dict([(v.VariableName, v.VariableLevel) for v in spssaux.VariableDict()])
# under SPSS v14 prints:  {'y': 'scale', 'x': 'scale'}
# under SPSS v20 prints:  {'y': 'nominal', 'x': 'nominal'}
end program.

variable level y (scale). /* <---- required in SPSS v20, not in SPSS v14.
ctables /table x by y  [validn '' F6.1].

Thanks in advance!
 
Regards,
Albert-Jan



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply | Threaded
Open this post in threaded view
|

Re: change in default VARIABLE LEVEL after upgrade

Albert-Jan Roskam
Hi Rick,

Thanks! That was exactly the information I was looking for. Too bad that only using SET SCALEMIN=1 does not restore the old behavior. I noticed that there are quite a number of "new" (ahem, we just upgraded from a very OLD spss version) SET commands. I don't have the CSR at hand here, but most of the newly added SET options seemed things that hardly, if ever, needed to be changed from the default values (SET TRHEADS, SET FUZZBITS, etc.). Are there any new SET commands that are commonly used?
 
Regards,
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

From: Rick Oliver <[hidden email]>
To: [hidden email]
Sent: Wednesday, June 6, 2012 4:32 PM
Subject: Re: [SPSSX-L] change in default VARIABLE LEVEL after upgrade

The difference for Y is that in version 14, any new numeric variable created by a transformation was treated as scale. The behavior was changed to be smarter about that and apply the same rules to new variables as those applied to existing variables. Prior to version 19 (or 18?) the only rule that mattered was SET SCALEMIN, but now there are numerous other factors that are evaluated prior to the looking at the number of unique values. These rules are defined here:

http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/topic/com.ibm.spss.statistics.help/dataedit_define_variable_measurement.htm

But I think the only solution for this particular problem is to either explicitly change the measurement level (as in your example) or tell CTABLES to treat it as scale.




Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]
Phone: 312.893.4922 | T/L: 206-4922




From:        Albert-Jan Roskam <[hidden email]>
To:        [hidden email]
Date:        06/06/2012 04:16 AM
Subject:        change in default VARIABLE LEVEL after upgrade
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi,
 
We upgraded from SPSS v14 to SPSS v20 and experience a version difference in conjunction with the NVALID function of CTABLES.
In SPSS v14, VARIABLE LEVEL y (SCALE) did not need to precede CTABLES, whereas in SPSS v20 this is required. The default measurement
level has changed from SCALE (SPSS v14) to NOMINAL (SPSS v20). Is there a way to get the old behavior back? I cannot find  a SET function
that does this.
 
data list free / x (f).
begin data
1 2 3
end data.
compute y = 1.
execute.

begin program python.
import spssaux
print dict([(v.VariableName, v.VariableLevel) for v in spssaux.VariableDict()])
# under SPSS v14 prints:  {'y': 'scale', 'x': 'scale'}
# under SPSS v20 prints:  {'y': 'nominal', 'x': 'nominal'}
end program.

variable level y (scale). /* <---- required in SPSS v20, not in SPSS v14.
ctables /table x by y  [validn '' F6.1].

Thanks in advance!
 
Regards,
Albert-Jan



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Reply | Threaded
Open this post in threaded view
|

Re: change in default VARIABLE LEVEL after upgrade

Jon K Peck
Many SET commands are a bit esoteric but were added for specific needs.  Typically the default settings are appropriate.  Probably the most important newer SET command is SET UNICODE.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Albert-Jan Roskam <[hidden email]>
To:        [hidden email]
Date:        06/07/2012 06:47 AM
Subject:        Re: [SPSSX-L] change in default VARIABLE LEVEL after upgrade
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi Rick,

Thanks! That was exactly the information I was looking for. Too bad that only using SET SCALEMIN=1 does not restore the old behavior. I noticed that there are quite a number of "new" (ahem, we just upgraded from a very OLD spss version) SET commands. I don't have the CSR at hand here, but most of the newly added SET options seemed things that hardly, if ever, needed to be changed from the default values (SET TRHEADS, SET FUZZBITS, etc.). Are there any new SET commands that are commonly used?
 
Regards,
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


From: Rick Oliver <[hidden email]>
To:
[hidden email]
Sent:
Wednesday, June 6, 2012 4:32 PM
Subject:
Re: [SPSSX-L] change in default VARIABLE LEVEL after upgrade


The difference for Y is that in version 14, any new numeric variable created by a transformation was treated as scale. The behavior was changed to be smarter about that and apply the same rules to new variables as those applied to existing variables. Prior to version 19 (or 18?) the only rule that mattered was SET SCALEMIN, but now there are numerous other factors that are evaluated prior to the looking at the number of unique values. These rules are defined here:

http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/topic/com.ibm.spss.statistics.help/dataedit_define_variable_measurement.htm

But I think the only solution for this particular problem is to either explicitly change the measurement level (as in your example) or tell CTABLES to treat it as scale.





Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]
Phone: 312.893.4922 | T/L: 206-4922




From:        
Albert-Jan Roskam <[hidden email]>
To:        
[hidden email]
Date:        
06/06/2012 04:16 AM
Subject:        
change in default VARIABLE LEVEL after upgrade
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Hi,

 
We upgraded from SPSS v14 to SPSS v20 and experience a version difference in conjunction with the NVALID function of CTABLES.

In SPSS v14, VARIABLE LEVEL y (SCALE) did not need to precede CTABLES, whereas in SPSS v20 this is required. The default measurement

level has changed from SCALE (SPSS v14) to NOMINAL (SPSS v20). Is there a way to get the old behavior back? I cannot find  a SET function

that does this.

 
data list free / x (f).
begin data
1 2 3
end data.
compute y = 1.
execute.

begin program python.
import spssaux
print dict([(v.VariableName, v.VariableLevel) for v in spssaux.VariableDict()])
# under SPSS v14 prints:  {'y': 'scale', 'x': 'scale'}
# under SPSS v20 prints:  {'y': 'nominal', 'x': 'nominal'}
end program.

variable level y (scale). /* <---- required in SPSS v20, not in SPSS v14.
ctables /table x by y  [validn '' F6.1].

Thanks in advance!

 
Regards,
Albert-Jan



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~