Solved

SPSS command language questions

Posted on 2003-11-24
4
354 Views
Last Modified: 2013-11-13
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.zip

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
0
Comment
Question by:nsriram
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 250 total points
ID: 9815865
Maybe:
compute var1 = $SYSMIS.
0
 

Author Comment

by:nsriram
ID: 9816160
very good guess if indeed it was that!  

I would give you half the points.. lets wait if someone else can tell me regarding the second point
0
 

Author Comment

by:nsriram
ID: 9822679
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.
0
 
LVL 22

Expert Comment

by:cookre
ID: 9822730
You'll have to post a question in Community Support to do that.
http://www.experts-exchange.com/Community_Support/


*mod: That's fine with me.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question