Advice for using SPSS with nominal vs. ordinal

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

Advice for using SPSS with nominal vs. ordinal

Omar Farook
Dear Experts,
  What type of analysis in SPSS we have to use if we want to detect the relationship between two variables nominal vs. ordinal?
  Nominal var, with 3 levels (independent)
  Ordinal var, dependent with 5 levels
  Sample size 40
  Thanks.


---------------------------------
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us.
Reply | Threaded
Open this post in threaded view
|

Re: Advice for using SPSS with nominal vs. ordinal

Bob Schacht-3
At 05:38 AM 8/31/2007, Omar Farook wrote:
>Dear Experts,
>   What type of analysis in SPSS we have to use if we want to detect the
> relationship between two variables nominal vs. ordinal?
>   Nominal var, with 3 levels (independent)
>   Ordinal var, dependent with 5 levels
>   Sample size 40
>   Thanks.

Check to see if the Kruskal-Wallis one-way analysis of variance with ranks
is appropriate for your research design. If so, you can find it in the menu
system under Analyze/non-parametric tests/k independent samples.

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
Reply | Threaded
Open this post in threaded view
|

Requesting a warning message when a new variable is added to the variable view

Gary Oliver
In reply to this post by Omar Farook
Hi All

I have a number of omnibus macros that do many calculations for
varaibles in the file. In some cases my variable names are improper and
SPSS writes them to the end of the file and they can be seen there in
variable view. What I would like is to receive a warning in the output
that this has occurred.

Does anyone know if this is currently possible?

If not, could Kyle or one of the SPSS people please consider this for an
enhancement

Warm regards/gary
Reply | Threaded
Open this post in threaded view
|

AW: Requesting a warning message when a new variable is added to the variable view

Georg Maubach
Hi Gary,

this is possible in SPSS. If you use SPSS syntax an macros it is more complicated than using the new Python programmability extension. With Python it is very easy to access the data dictionary and perform computations or analysis steps based on the conditions found in the data dictionary at a certain time.

You can find more information in Raynald Levesque's data management handbook. Please have a look at chapter 14 Working with Variable Dictionary Information on p. 254 of the 4th edition of that book. You download this book for free from the SPSS site by clicking on http://www.spss.com/spss/data_management_book.htm.

Best regards

Georg Maubach


-----Ursprüngliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:[hidden email]] Im Auftrag von Gary Oliver
Gesendet: Samstag, 1. September 2007 03:23
An: [hidden email]
Betreff: Requesting a warning message when a new variable is added to the variable view

Hi All

I have a number of omnibus macros that do many calculations for varaibles in the file. In some cases my variable names are improper and SPSS writes them to the end of the file and they can be seen there in variable view. What I would like is to receive a warning in the output that this has occurred.

Does anyone know if this is currently possible?

If not, could Kyle or one of the SPSS people please consider this for an enhancement

Warm regards/gary
Reply | Threaded
Open this post in threaded view
|

Re: Requesting a warning message when a new variable is added to the variable view

Peck, Jon
In reply to this post by Gary Oliver
It sounds like you want something like
Option Explicit
which is available in SaxBasic.  That applies only to variables in the SaxBasic code, though.

While there is no direct way to do this in SPSS, it would be very easy to use two tiny Python programs in your job stream to report new variables.

When you want to start counting, do
begin program.
import spss
numvars = spss.GetVariableCount()
end program.

When you want to check for new ones, run
begin program.
import spss
newnumvars = spss.GetVariableCount()
if newnumvars > numvars:
   print "*** New variables created: ",
   "\n".join([spss.GetVariableName(v-1) for v in range(numvars, newnumvars)])
end program.

You could put each of these little blocks of code in a file and invoke them with an INSERT command (not an INCLUDE command).

This approach assumes that you are not deleting any variables or changing the order.  It would be only a small amount of additional work to generalize this code to cover that case.

Of course this requires SPSS 14 or later and the Python plugin from SPSS Developer Central (www.spss.com/devcentral)

HTH,
Jon Peck



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gary Oliver
Sent: Friday, August 31, 2007 8:23 PM
To: [hidden email]
Subject: [SPSSX-L] Requesting a warning message when a new variable is added to the variable view

Hi All

I have a number of omnibus macros that do many calculations for
varaibles in the file. In some cases my variable names are improper and
SPSS writes them to the end of the file and they can be seen there in
variable view. What I would like is to receive a warning in the output
that this has occurred.

Does anyone know if this is currently possible?

If not, could Kyle or one of the SPSS people please consider this for an
enhancement

Warm regards/gary
Reply | Threaded
Open this post in threaded view
|

R: Requesting a warning message when a new variable is added to the variable view

Luca Meyer
Just one small correction to the code Jon provided: the line before the last
should say

print "*** New variables created: ", "\n".join([spss.GetVariableName(v) for
v in range(numvars, newnumvars)])

Instead of

print "*** New variables created: ", "\n".join([spss.GetVariableName(v-1)
for v in range(numvars, newnumvars)])

Cheers,
Luca

Mr. Luca MEYER
Market research, data analysis & more
www.lucameyer.com - Tel: +39.339.495.00.21


-----Messaggio originale-----
Da: SPSSX(r) Discussion [mailto:[hidden email]] Per conto di Peck,
Jon
Inviato: sabato 1 settembre 2007 17.17
A: [hidden email]
Oggetto: Re: Requesting a warning message when a new variable is added to
the variable view

It sounds like you want something like
Option Explicit
which is available in SaxBasic.  That applies only to variables in the
SaxBasic code, though.

While there is no direct way to do this in SPSS, it would be very easy to
use two tiny Python programs in your job stream to report new variables.

When you want to start counting, do
begin program.
import spss
numvars = spss.GetVariableCount()
end program.

When you want to check for new ones, run begin program.
import spss
newnumvars = spss.GetVariableCount()
if newnumvars > numvars:
   print "*** New variables created: ",
   "\n".join([spss.GetVariableName(v-1) for v in range(numvars,
newnumvars)]) end program.

You could put each of these little blocks of code in a file and invoke them
with an INSERT command (not an INCLUDE command).

This approach assumes that you are not deleting any variables or changing
the order.  It would be only a small amount of additional work to generalize
this code to cover that case.

Of course this requires SPSS 14 or later and the Python plugin from SPSS
Developer Central (www.spss.com/devcentral)

HTH,
Jon Peck



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Gary Oliver
Sent: Friday, August 31, 2007 8:23 PM
To: [hidden email]
Subject: [SPSSX-L] Requesting a warning message when a new variable is added
to the variable view

Hi All

I have a number of omnibus macros that do many calculations for varaibles in
the file. In some cases my variable names are improper and SPSS writes them
to the end of the file and they can be seen there in variable view. What I
would like is to receive a warning in the output that this has occurred.

Does anyone know if this is currently possible?

If not, could Kyle or one of the SPSS people please consider this for an
enhancement

Warm regards/gary

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.13.1/982 - Release Date: 31/08/2007
17.21


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.13.2/985 - Release Date: 02/09/2007
16.32
Reply | Threaded
Open this post in threaded view
|

Re: Requesting a warning message when a new variable is added

Peck, Jon
Good catch.  Variables are numbered starting with 0, and range(a,b) returns values a, a+1,... a+k where a+k < b.  The upper limit is excluded.

-Jon Peck

-----Original Message-----
From: Luca Meyer [mailto:[hidden email]]
Sent: Monday, September 03, 2007 3:02 AM
To: [hidden email]
Cc: Peck, Jon
Subject: [BULK] R: Requesting a warning message when a new variable is added to the variable view
Importance: Low

Just one small correction to the code Jon provided: the line before the last should say

print "*** New variables created: ", "\n".join([spss.GetVariableName(v) for v in range(numvars, newnumvars)])

Instead of

print "*** New variables created: ", "\n".join([spss.GetVariableName(v-1) for v in range(numvars, newnumvars)])

Cheers,
Luca

Mr. Luca MEYER
Market research, data analysis & more
www.lucameyer.com - Tel: +39.339.495.00.21


-----Messaggio originale-----
Da: SPSSX(r) Discussion [mailto:[hidden email]] Per conto di Peck, Jon
Inviato: sabato 1 settembre 2007 17.17
A: [hidden email]
Oggetto: Re: Requesting a warning message when a new variable is added to the variable view

It sounds like you want something like
Option Explicit
which is available in SaxBasic.  That applies only to variables in the SaxBasic code, though.

While there is no direct way to do this in SPSS, it would be very easy to use two tiny Python programs in your job stream to report new variables.

When you want to start counting, do
begin program.
import spss
numvars = spss.GetVariableCount()
end program.

When you want to check for new ones, run begin program.
import spss
newnumvars = spss.GetVariableCount()
if newnumvars > numvars:
   print "*** New variables created: ",
   "\n".join([spss.GetVariableName(v-1) for v in range(numvars, newnumvars)]) end program.

You could put each of these little blocks of code in a file and invoke them with an INSERT command (not an INCLUDE command).

This approach assumes that you are not deleting any variables or changing the order.  It would be only a small amount of additional work to generalize this code to cover that case.

Of course this requires SPSS 14 or later and the Python plugin from SPSS Developer Central (www.spss.com/devcentral)

HTH,
Jon Peck



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gary Oliver
Sent: Friday, August 31, 2007 8:23 PM
To: [hidden email]
Subject: [SPSSX-L] Requesting a warning message when a new variable is added to the variable view

Hi All

I have a number of omnibus macros that do many calculations for varaibles in the file. In some cases my variable names are improper and SPSS writes them to the end of the file and they can be seen there in variable view. What I would like is to receive a warning in the output that this has occurred.

Does anyone know if this is currently possible?

If not, could Kyle or one of the SPSS people please consider this for an enhancement

Warm regards/gary

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.13.1/982 - Release Date: 31/08/2007 17.21


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.13.2/985 - Release Date: 02/09/2007 16.32