series of variables

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

Posts: 1
Joined: Thu Jan 31, 2013 8:08 pm

series of variables

Postby panchompoo » Thu Jan 31, 2013 8:11 pm


How do I put a series of variables in a code without having to list them all out? For example, in paired t-test, I want to do T-TEST PAIRED v1 v2 v3 v4 v5 WITH v6 v7 v8 v9 v10 (PAIRED). I was trying to do "v1 TO v5 WITH v6 TO v10" but it didn't work. I have many more variables than that, so it would be nice if I don't have to list them out.

Thank you!
Posts: 5
Joined: Mon Feb 11, 2013 7:10 pm

Re: series of variables

Postby Marc_Leslie » Tue Feb 12, 2013 4:23 pm

I am 99% sure that this cannot be done as you want it to be done. Saying "include V1 to V5" makes sense to you and me, but SPSS is so literal it just does not get it. I have spent many hours searching for this answer, and don't think it exists.
Posts: 119
Joined: Wed May 25, 2011 7:07 am

Re: series of variables

Postby JonPedersen » Wed Feb 13, 2013 4:39 pm

It is quite possible:

Code: Select all

t-test pairs=v1 to v3 with v4 to v7.
whenever SPSS says varlist, then you can use the varfrom TO varto syntax, but they have to be adjacent in the file (just being in alphabetical order does not help.

Who is online

Users browsing this forum: No registered users and 1 guest