simple query

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

simple query

Khaleel Hussaini
Hello Listers,
    I am having trouble with a simple query. I have three variables A B & C.
These are quantitative scores ranging 0 to 100. I want to pick two top
scores and sum them. For e.g.
A  B  C    NewVar
65 50  78 65+78
50 65 80 65 + 80
70 78 55  70 + 78
60 60 65 60 +65
etc.
Sorry for posting a silly query.

=====================
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: simple query

ariel barak
Hi Khaleel,

The code below works properly as long as there are always only 3 variables.

HTH,
Ariel Barak

DATA LIST LIST /ID (F8) A (F8) B (F8) C (F8).
BEGIN DATA
1 65 50 78
2 50 65 80
3 70 78 55
4 60 60 65
END DATA.

DATASET NAME Original.

COMPUTE Top2=SUM(A TO C) - MIN(A TO C).
EXE.

On Fri, Dec 19, 2008 at 12:31 PM, Khaleel Hussaini <
[hidden email]> wrote:

> Hello Listers,
>    I am having trouble with a simple query. I have three variables A B & C.
> These are quantitative scores ranging 0 to 100. I want to pick two top
> scores and sum them. For e.g.
> A  B  C    NewVar
> 65 50  78 65+78
> 50 65 80 65 + 80
> 70 78 55  70 + 78
> 60 60 65 60 +65
> etc.
> Sorry for posting a silly query.
>
> =====================
> 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: simple query

Ramzan Afzal-2
In reply to this post by Khaleel Hussaini
Dear All,

Could u please let me know about computing mean and variance (shape & scale)
of gamma distribution for a set of data in SPSS?

Regards

Ramzan

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