nsriram
asked on
SPSS command language questions
ok.. this is an app not many here use (statistical applications).. SPSS ver 11.5
for reference the command reference manual (8 meg download) can be got from comunaware.com/pers/base.z ip
try as I may I cannot find the assignment syntax to set a variable to the system missing value (this is represented by a .)
if I say
compute var1 =.
it complains correctly that . is the command terminator. and it doesnt like it if var1 is set to '.' which is a string type
my second question pertains to merging files (records with different variables across different files)
usually a merge is based on some key which is present in both files
but what if the following scenario is true:
Suppose there are 10 subjects, each with 100 lines (records) of data.
In another file I have one variable for each of the 10 subjects in 10 records (lines)
How do I merge the two files so that this new variable is repeated 100 times for each subject in the bigger data set ? assume that both files have the same ten unique subject numbers (this is repeated 100 times per subject in the first file)
these are trivial programming problems but unfortunately it is not clear how to coax SPSS command language to do this
for reference the command reference manual (8 meg download) can be got from comunaware.com/pers/base.z
try as I may I cannot find the assignment syntax to set a variable to the system missing value (this is represented by a .)
if I say
compute var1 =.
it complains correctly that . is the command terminator. and it doesnt like it if var1 is set to '.' which is a string type
my second question pertains to merging files (records with different variables across different files)
usually a merge is based on some key which is present in both files
but what if the following scenario is true:
Suppose there are 10 subjects, each with 100 lines (records) of data.
In another file I have one variable for each of the 10 subjects in 10 records (lines)
How do I merge the two files so that this new variable is repeated 100 times for each subject in the bigger data set ? assume that both files have the same ten unique subject numbers (this is repeated 100 times per subject in the first file)
these are trivial programming problems but unfortunately it is not clear how to coax SPSS command language to do this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found the other half of the answer
MATCH FILES FILE = * / TABLE = 'fastlat.sav'/ BY subject.
assuming that * is the working file and fastlat.sav is the second smaller file. subject is used as the key.
admin.. please award cookre 250 points and close this thread.
MATCH FILES FILE = * / TABLE = 'fastlat.sav'/ BY subject.
assuming that * is the working file and fastlat.sav is the second smaller file. subject is used as the key.
admin.. please award cookre 250 points and close this thread.
You'll have to post a question in Community Support to do that.
https://www.experts-exchange.com/Community_Support/
*mod: That's fine with me.
https://www.experts-exchange.com/Community_Support/
*mod: That's fine with me.
ASKER
I would give you half the points.. lets wait if someone else can tell me regarding the second point