SORT VARIABLES BY multiple attributes. Is SPSS's sort algorithm stable?

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

SORT VARIABLES BY multiple attributes. Is SPSS's sort algorithm stable?

Art Kendall
It *appears* that this works.  It is possible that SPSS uses a sort algorithm
that is "stable".  

sort variables by ATTRIBUTE Var.Grouping.
sort variables by ATTRIBUTE MR.Set.

https://en.wikipedia.org/wiki/Category:Stable_sorts

It is possible that SPSS uses a sort algorithm that is "stable".  
Can I* rely on* using several  SORT VARIABLES command to give me the same
thing as if SORT VARIABLES allowed specifying more than one attribute?



-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: SORT VARIABLES BY multiple attributes. Is SPSS's sort algorithm stable?

Jon Peck
Yes, the SORT algorithm is stable.

On Mon, Oct 5, 2020 at 2:06 PM Art Kendall <[hidden email]> wrote:
It *appears* that this works.  It is possible that SPSS uses a sort algorithm
that is "stable". 

sort variables by ATTRIBUTE Var.Grouping.
sort variables by ATTRIBUTE MR.Set.

https://en.wikipedia.org/wiki/Category:Stable_sorts

It is possible that SPSS uses a sort algorithm that is "stable". 
Can I* rely on* using several  SORT VARIABLES command to give me the same
thing as if SORT VARIABLES allowed specifying more than one attribute?



-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

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


--
Jon K Peck
[hidden email]

===================== 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: SORT VARIABLES BY multiple attributes. Is SPSS's sort algorithm stable?

Art Kendall
Thanks.

I thought I had a workaround but was unsure.



-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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
Art Kendall
Social Research Consultants