Hi All,
we have to add some files together without interleaving cases but need to now the source of the cases. We created a variable "Source" in the first dataset and assigned a value of "311" to all cases and label it with "Example 1". We created a variable "Source" in the second dataset and assigned a value of "312" to all cases and label it with "Example 2". If we add the files using ADD FILES /FILE='example1.sav' /FILE='example2.sav' . the resulting variable "Source" does not have the label for the value "312". Is there a way to merge the variable labels for the variables of both files? Best regards Georg Maubach MRSC Division Corporate & MRSC Services Deutsche Post World Net Business Consulting GmbH Market Research Service Center |
If you add the following, you will get a 0/1 variable for each file.
ADD FILES /FILE='example1.sav'/IN=inex1 /FILE='example2.sav'/IN=inex2 . Then you can run a crosstab of inex1 by inex2 to get at how many records from each source contributed to the combined dataset. Alternatively, I believe that if you assign the SAME Variable label for Source in both datasets and assign: Value labels Source 311 'Example 1' 312 'Example 2'. Then you will get what you are asking. Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Georg Maubach Sent: Wednesday, November 15, 2006 11:49 AM To: [hidden email] Subject: [SPSSX-L] Combining Files with ADD FILES: Variable Label Problem Hi All, we have to add some files together without interleaving cases but need to now the source of the cases. We created a variable "Source" in the first dataset and assigned a value of "311" to all cases and label it with "Example 1". We created a variable "Source" in the second dataset and assigned a value of "312" to all cases and label it with "Example 2". If we add the files using ADD FILES /FILE='example1.sav' /FILE='example2.sav' . the resulting variable "Source" does not have the label for the value "312". Is there a way to merge the variable labels for the variables of both files? Best regards Georg Maubach MRSC Division Corporate & MRSC Services Deutsche Post World Net Business Consulting GmbH Market Research Service Center PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. |
In reply to this post by Georg Maubach
APPLY DICTIONARY from “lastmonth.sav” /VARINFO LEVEL MISSING
VALLABELS = MERGE. - The level of measurement and defined missing values from the source dataset are applied to the matching variables in the active target) dataset. Any existing missing values definitions for those variables in the active dataset are deleted. - Value labels for matching variables in the two datasets are merged. If the same value has a defined value label in both the source and active datasets, the value label in the active dataset is unchanged. On 16/11/2006, at 4:49 AM, Georg Maubach wrote: > Hi All, > > we have to add some files together without interleaving cases but need > to now the source of the cases. > > We created a variable "Source" in the first dataset and assigned a > value > of "311" to all cases and label it with "Example 1". We created a > variable "Source" in the second dataset and assigned a value of > "312" to > all cases and label it with "Example 2". > > If we add the files using > > ADD FILES > /FILE='example1.sav' > /FILE='example2.sav' . > > the resulting variable "Source" does not have the label for the value > "312". > > Is there a way to merge the variable labels for the variables of both > files? > > Best regards > > Georg Maubach > MRSC Division Corporate & MRSC Services > > Deutsche Post World Net > Business Consulting GmbH > Market Research Service Center |
In reply to this post by Georg Maubach
This bounced back and we had been having e-mail problems, so I'm trying
again as I didn't see that it actually arrived at the list--my PROFUSE apologies if this is a second posting.... Melissa -----Original Message----- From: L-Soft list server at UGA (1.8d) [mailto:[hidden email]] Sent: Thursday, November 16, 2006 8:36 AM Subject: Rejected posting to [hidden email] -----Original Message----- From: Melissa Ives <[hidden email]> Subject: Re: Combining Files with ADD FILES: Variable Label Problem If you add the following, you will get a 0/1 variable for each file. ADD FILES /FILE='example1.sav'/IN=inex1 /FILE='example2.sav'/IN=inex2 . Then you can run a crosstab of inex1 by inex2 to get at how many records from each source contributed to the combined dataset. Alternatively, I believe that if you assign the SAME Variable label for Source in both datasets and assign: Value labels Source 311 'Example 1' 312 'Example 2'. Then you will get what you are asking. Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Georg Maubach Sent: Wednesday, November 15, 2006 11:49 AM To: [hidden email] Subject: [SPSSX-L] Combining Files with ADD FILES: Variable Label Problem Hi All, we have to add some files together without interleaving cases but need to now the source of the cases. We created a variable "Source" in the first dataset and assigned a value of "311" to all cases and label it with "Example 1". We created a variable "Source" in the second dataset and assigned a value of "312" to all cases and label it with "Example 2". If we add the files using ADD FILES /FILE='example1.sav' /FILE='example2.sav' . the resulting variable "Source" does not have the label for the value "312". Is there a way to merge the variable labels for the variables of both files? Best regards Georg Maubach MRSC Division Corporate & MRSC Services Deutsche Post World Net Business Consulting GmbH Market Research Service Center PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. |
Free forum by Nabble | Edit this page |