Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Vanished data in merged variable -- didn't found any usable help on SPSS.com TIA (French or English)

1,312 views
Skip to first unread message

Rex Terras

unread,
Oct 1, 2001, 10:55:45 AM10/1/01
to
Hi, french original following.

English:

During a MERGE/add variables in SPSS, I lose the data values for each
of the two variables I am merging from the file on disk (the values
are really there when I open the original file but simply vanished in
the merged file). Does someone (Reynal Lévesque?) know about this
problem ... and/or a solution?

Work file: indic.sav; 30,000 observations (8 Mb).

Original file on disk: question.sav; 30,000 observations (25 Mb); two
variables to merge (import); matched observations from a key variable
present in the two files (NOID, numéro d'identification).

Merging seems to execute well ... save for the resulting data values
that are vanished for my two imported variables. Any idea. ©¿©


French:

Lors de la fusion de deux fichiers (MERGE/add variables) où j'ajoute
deux variables dans mon fichier de travail, les valeurs de chaque
variable sont disparues (même si elles sont bel et bien présente dans
mon fichier d'origine. Quelqu'un a-t-il une idée de ce qui se passe
... et une solution à suggérer?

Fichier de travail: indic.sav; 30,000 observations (8 Mb).

Fichier sur disque: question.sav; 30,000 observations (25 Mb); deux
variables à fusionner (importer); observations synchronisées par une
variable clé (NOID, numéro d'identification).

La fusion se passe bien mais les valeurs des deux variables importées
(bien présentes dans le fichier sur disque) sont disparues du fichier
de travail!!!! ©¿©

Je vais tenter de travailler en exportant/important avec Excel et suis
bien confiant d'y arriver, mais je trouve cette «solution» peu
élégante.

Matthias Nübling

unread,
Oct 1, 2001, 1:30:19 PM10/1/01
to
hi rex,

one simple idea: check first if the two merging vars have the same type
and format...

matthias

Rex Terras schrieb:

Jonathan Fry

unread,
Oct 1, 2001, 2:19:01 PM10/1/01
to
See if you can select Transform/RunPendingTransformations from the menus.
If the data columns appear with system missing values in the data editor,
perhaps the data have not been passed, so the values have not been
determined yet.

Jonathan Fry
SPSS Inc.
SPSS questions to sup...@spss.com, please
----------------------------------------------------

Rex Terras

unread,
Oct 1, 2001, 6:39:26 PM10/1/01
to
There is no pending transformation. And yes, the spaces are occupied
by missing values.

Maybe the problem is due to the big file (35,000 respondents; some 250
questions). I deleted all irrelevant variables and save a much
smaller file (5 variables) ... then I applied my merge, and succeeded.
But it was a long process deleting all excess variables (about one
hour on my department PII/266) ... should have processed it on my
Athlon/900 (and 512 Mb Ram) at home.

Raynald Levesque

unread,
Oct 1, 2001, 8:52:40 PM10/1/01
to
On Mon, 01 Oct 2001 22:39:26 GMT, Rex Terras <rext...@hotmail.com>
wrote:

Bonjour Rex

You do not mention the version of SPSS you are using. If you are using
10.xx and the version is less than 10.07, it is highly recommended to
udgrade to 10.07. The patch is here
http://www.spss.com/tech/patches/SPSS-1007.htm

FYI 30,000 observations and 250 variables is NOT a big file. SPSS can
handle 2.15 billion cases and 32,000 variables.

It does not look normal to take 1 hour to delete the 245 variables
even on "slow" computer. How much RAM do you have? How much time does
it take you on your Athlon 900?

Where both files sorted by NOID?

If you post the syntax this could help somebody find the problem.

As Matthias suggested, check that the format of NOID is identical in
both files.

Regards

Raynald Levesque rlev...@videotron.ca
Visit My SPSS Pages: http://pages.infinit.net/rlevesqu/index.htm

Magenta

unread,
Oct 2, 2001, 6:25:21 AM10/2/01
to

"Raynald Levesque" <rlev...@videotron.ca> wrote in message
news:na3irtoc7pcmmio7d...@4ax.com...

> On Mon, 01 Oct 2001 22:39:26 GMT, Rex Terras <rext...@hotmail.com>
> wrote:
>
> >There is no pending transformation. And yes, the spaces are occupied
> >by missing values.
> >
> >Maybe the problem is due to the big file (35,000 respondents; some 250
> >questions). I deleted all irrelevant variables and save a much
> >smaller file (5 variables) ... then I applied my merge, and succeeded.
> >But it was a long process deleting all excess variables (about one
> >hour on my department PII/266) ... should have processed it on my
> >Athlon/900 (and 512 Mb Ram) at home.
>
> Where both files sorted by NOID?
>
> If you post the syntax this could help somebody find the problem.
>
> As Matthias suggested, check that the format of NOID is identical in
> both files.

I got missing values once when I forgot to sort my two data sets prior to a
merge - it gave me missing values.
Even if the datasets are sorted, still sort using SPSS prior to the merge.

cheers
Michelle


Moshe Braner

unread,
Oct 2, 2001, 11:44:28 AM10/2/01
to
On Mon, 01 Oct 2001 14:55:45 GMT, Rex Terras <rext...@hotmail.com> wrote:
> During a MERGE/add variables in SPSS, I lose the data values for each
> of the two variables I am merging from the file on disk (the values
> are really there when I open the original file but simply vanished in
> the merged file).

If variables of the same name already exist in the first file, with missing data,
then the values from the second file do not get into the merged file.
Should use syntax like this:

get file=file1 /drop varx vary.
match files file=* /table=file2 /by varz.

If some records in the first file do have data in these variables, and
the merge is done for the purpose of adding in values for other records,
can use syntax like this:

get file=file1 /rename (varx vary = oldx oldy).
match files file=* /table=file2 /by varz.
if (missing(varx) and not missing(oldx)) varx = oldx.
if (missing(vary) and not missing(oldy)) vary = oldy.
/* Can later drop oldx and oldy.

Alternatively, can use the UPDATE command instead of the
MATCH FILES command.

- Moshe


T-Rex

unread,
Oct 2, 2001, 11:17:30 AM10/2/01
to
My data (on both files) is sorted by NOID.

Syntax was a very simple Merge/Add Variables that executed without
problem on the smaller files (after deleting unnecessary variables).

Format of NID is the same, of course.

Deleting variables took so long because I had to manually select somme
colums (maybe 10-20) each time before cutting those variables: so many
«manual» processes.

After merging, my new data works flawlessly ... but it's leaving an
existential question unanswerded "Why a simple MERGE didn't work
correctly th first time?"

Thanks to all that took some time (I didn't copy my syntax since it is
not the same computer (and our antedeluvian governmental organisation
cutted all internet access !!!!).

Nick Nelson

unread,
Oct 3, 2001, 6:51:01 AM10/3/01
to

Rex Terras wrote:
>
> There is no pending transformation. And yes, the spaces are occupied
> by missing values.
>
> Maybe the problem is due to the big file (35,000 respondents; some 250
> questions). I deleted all irrelevant variables and save a much
> smaller file (5 variables) ... then I applied my merge, and succeeded.
> But it was a long process deleting all excess variables (about one
> hour on my department PII/266) ... should have processed it on my
> Athlon/900 (and 512 Mb Ram) at home.

I occasionally get inexplicable match/merge failures like this. Quite
often it turns out to be due to things like duplicate cases on one
or other file, or variables with the same name but differing type
or length (in the case of strings).

Irritatingly, there are times when you don't get any sort of
warning or error message from this, I've no idea why since
I'm sure on earlier versions one did.

It sometimes saddens me how often I wish I was still using
6.1.4 !

Good luck,

Nick

Moshe Braner

unread,
Oct 4, 2001, 5:27:18 PM10/4/01
to
On Wed, 03 Oct 2001 11:51:01 +0100, Nick Nelson <mews...@man.ac.uk> wrote:
> It sometimes saddens me how often I wish I was still using 6.1.4 !

I still do use 6.1.4 - and so can you!


0 new messages