Finding the lowest value of three variables

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash


Finding the lowest value of three variables

Postby sam » Fri Jun 22, 2007 2:59 pm

I have three variables (time taken in Trial 1,2,3) for 300 subjects, creating a matrix of (3X300). I need to find the lowest time for each trial and then create a new variable with the lowest time.
I will show you what i want it to look like

Time 1 Time 2 Time3 Shortest Time
Subject1 1 2 5 1
Subject2 2 1 7 1
Subject 300 3 4 7 3

Obviously this is easy to do by hand but a pain for 300 subjects. I am using SPSS 12.0 for windows.

thank you very much for your help
Posts: 2760
Joined: Tue Jun 12, 2007 12:08 pm
Location: Florida, USA

Postby statman » Fri Jun 22, 2007 5:14 pm

There is a Min function within Compute, see if this helps
See the note below

NOTE: Please read the Posting Guidelines and always tell us your OS, the SPSS version and information about your study and data!

Statistical Services
Site Admin
Posts: 137
Joined: Fri Jun 22, 2007 7:00 am
Location: Australia

Postby andris » Sat Jun 23, 2007 5:02 am

As Statman states, you can use Compute to get what you need. In SPSS go to Transform -> Compute. Make a new variable (fill in the name of the variable in "Target variable". Than use the following Compute formula:

Code: Select all

Where var1, 2 and 3 are the names of your variables. You can use more than three if neccessary. Let us know if that gives you the wanted result.

Who is online

Users browsing this forum: No registered users and 1 guest