MATCH FILES GUI bug?

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

MATCH FILES GUI bug?

Mario Giesel
* Dear SPSS friends,
  there's probably a bug in the MATCH FILES section of the GUI;
Say I want to match file 1 with file 2 and want to keep only cases available in one of the files;
The difference in the command syntax is /FILE = * vs. /TABLE = *;
If in the GUI I checkmark "active data set is key table" then the syntax produces the opposite (other data set is key table) and vice versa;
See the following example, please.

* Create file 1.
DATA LIST /ID 1-3 SEX 5 (A) .
BEGIN DATA
001 m
002 f
003 f
005 m
END DATA.
SAVE OUTFILE = "file1.sav".

* Create file 2.
DATA LIST /ID 1-3 AGE 5-6.
BEGIN DATA
001 28
002 29
003 35
004 45
END DATA.

* GUI: Other data set is key table => But active data set is used as key table.
MATCH FILES /FILE=*
  /TABLE='C:\Program Files\IBM\SPSS\Statistics\22\file1.sav'
  /BY ID.
EXECUTE.

* GUI: Active data set is key table => But other data set is used as key table.
MATCH FILES /TABLE=*
  /FILE='C:\Program Files\IBM\SPSS\Statistics\22\file1.sav'
  /BY ID.
EXECUTE.

Thanks,
  Mario

===================== 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
Mario Giesel
Munich, Germany
Reply | Threaded
Open this post in threaded view
|

Re: MATCH FILES GUI bug?

John F Hall

Mario

 

If I understand your problem, why not just use?

 

match files /file = <file1> /file = <file2> /keep <varlist>

 

Does this help?

 

John F Hall (Mr)

[Retired academic survey researcher]

 

Email:   [hidden email] 

Website: www.surveyresearch.weebly.com

SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mario Giesel
Sent: 01 April 2015 09:57
To: [hidden email]
Subject: MATCH FILES GUI bug?

 

* Dear SPSS friends,
  there's probably a bug in the MATCH FILES section of the GUI;
Say I want to match file 1 with file 2 and want to keep only cases available in one of the files;
The difference in the command syntax is /FILE = * vs. /TABLE = *;
If in the GUI I checkmark "active data set is key table" then the syntax produces the opposite (other data set is key table) and vice versa;
See the following example, please.

* Create file 1.
DATA LIST /ID 1-3 SEX 5 (A) .
BEGIN DATA
001 m
002 f
003 f
005 m
END DATA.
SAVE OUTFILE = "file1.sav".

* Create file 2.
DATA LIST /ID 1-3 AGE 5-6.
BEGIN DATA
001 28
002 29
003 35
004 45
END DATA.

* GUI: Other data set is key table => But active data set is used as key table.
MATCH FILES /FILE=*
  /TABLE='C:\Program Files\IBM\SPSS\Statistics\22\file1.sav'
  /BY ID.
EXECUTE.

* GUI: Active data set is key table => But other data set is used as key table.
MATCH FILES /TABLE=*
  /FILE='C:\Program Files\IBM\SPSS\Statistics\22\file1.sav'
  /BY ID.
EXECUTE.

 

Thanks,

  Mario

 

===================== 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: MATCH FILES GUI bug?

Mario Giesel
Thanks, John,

your command match files /file = <file1> /file = <file2> /keep <varlist>
uses the active data set as key table. This means that cases not available in File 1 are dropped.
That's okay and I do know how to solve this via syntax.
My point, however, is that the GUI shortcut is buggy and should be fixed.

Thanks,
  Mario

John F Hall <[hidden email]> schrieb am 10:40 Mittwoch, 1.April 2015:


Mario
 
If I understand your problem, why not just use?
 
match files /file = <file1> /file = <file2> /keep <varlist>
 
Does this help?
 
John F Hall (Mr)
[Retired academic survey researcher]
 
Email:   [hidden email] 
 
 
 
 
 
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mario Giesel
Sent: 01 April 2015 09:57
To: [hidden email]
Subject: MATCH FILES GUI bug?
 
* Dear SPSS friends,
  there's probably a bug in the MATCH FILES section of the GUI;
Say I want to match file 1 with file 2 and want to keep only cases available in one of the files;
The difference in the command syntax is /FILE = * vs. /TABLE = *;
If in the GUI I checkmark "active data set is key table" then the syntax produces the opposite (other data set is key table) and vice versa;
See the following example, please.

* Create file 1.
DATA LIST /ID 1-3 SEX 5 (A) .
BEGIN DATA
001 m
002 f
003 f
005 m
END DATA.
SAVE OUTFILE = "file1.sav".

* Create file 2.
DATA LIST /ID 1-3 AGE 5-6.
BEGIN DATA
001 28
002 29
003 35
004 45
END DATA.

* GUI: Other data set is key table => But active data set is used as key table.
MATCH FILES /FILE=*
  /TABLE='C:\Program Files\IBM\SPSS\Statistics\22\file1.sav'
  /BY ID.
EXECUTE.

* GUI: Active data set is key table => But other data set is used as key table.
MATCH FILES /TABLE=*
  /FILE='C:\Program Files\IBM\SPSS\Statistics\22\file1.sav'
  /BY ID.
EXECUTE.
 
Thanks,
  Mario
 
===================== 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


===================== 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
Mario Giesel
Munich, Germany