mixed labels in spss file

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)

by gasper » Fri Dec 18, 2020 7:51 am

I use jamovi a lot to import spss files and it works like a charm every time. It's really great and that's why I was surprised to see that it created a mismatch between labels and their variables.

It's not a complete mismatch - some variables get labels right and others don't and I couldn't figure the pattern. Also some missing value codes didn't import as well but this could be connected.

I have here the example file and I first noted mismatch at variable MTSUP (where missing values weren't imported). But then I noted that mismatch was all over the place.

I tried 1.2.27, 1.6.3 and 1.6.8 - it's consistent (at least) :smirk: .

Is it a bug or did we find somethng odd on SPSS side?

Regards,

Gasper
Attachments
spss_view.png
spss_view.png (91.35 KiB) Viewed 413 times
pisa_small_pia5.zip
(205.03 KiB) Downloaded 16 times
Everything starts somewhere, although many physicists disagree. TP
gasper
 
Posts: 10
Joined: Tue Oct 13, 2020 8:27 am
Location: Slovenia

by jonathon » Fri Dec 18, 2020 9:25 am

hey,

thanks for reporting. can you spell this out a bit clearly for me, which columns aren't quite right? i'm taking a quick look over it, and nothings jumping out at me.

with thanks

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am

by MAgojam » Fri Dec 18, 2020 12:29 pm

Hi, guys.
I don't know if it can help us understand this import of @gasper's .sav file.

I opened the file in both jamovi v1.6.8 and SPSS v25 and captured the screenshot that I attach.
SPSS_IMPORT_PROBLEM.PNG
SPSS_IMPORT_PROBLEM.PNG (150.69 KiB) Viewed 405 times

I refer to three variables (CLCUSE301, CLCUSE302, Deffort) where the Missing encoding in SPPS is the same (Missing = '99', Invalid = '98', N/A = '97').
If in jamovi, I try to change the first '97' which was supposed to be '99' for Missing, it won't let me, but if I try to change the second '97' to '99', it allows me, but it automatically changes also the first '97' in '99'.
At this point it recognizes the Missing, but no longer recognizes the N/A.
Jamovi correctly recognized these variables as Measure type (Nominal) and Data type (Text) since in SPSS they are encoded as Measure (Nominal) and Type (String) and imported the data as described.
If in jamovi I change the Data type from Text to Integer, I can replace the three strings with the corresponding values ​​(99, 98, 97) and the variable is usable correctly.

Greetings,
Maurizio
User avatar
MAgojam
 
Posts: 125
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

by gasper » Fri Dec 18, 2020 4:14 pm

If I go from start:
1. variable - CNT label=empty
2. variable - SUBNATIO label=label from CNT (Country code 3 character)
..
4. variable - OECD label= correct!

Some of variables have correct labels, others are shifted (usually for one field).
Everything starts somewhere, although many physicists disagree. TP
gasper
 
Posts: 10
Joined: Tue Oct 13, 2020 8:27 am
Location: Slovenia

by jonathon » Fri Dec 18, 2020 10:43 pm

hey,

i made some changes. could you check the following for me. does this all look correct?

pisa_small_pia5(2).omv.zip
(175.39 KiB) Downloaded 16 times


with thanks

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am

by gasper » Mon Dec 21, 2020 1:29 pm

Hey!

Great improvement - first 410 variables have correct labels. But then it starts:

411 variable (AGE) has empty label (should be 'Age of Student')
412 is correct (GRADE)
413 is correct (progn)
414 (ANXMAT) has label from AGE ('Age of Student')
415 (ATSCHL) has label from 414
416 same (shifted for 1 column)
417 same
418 same
419 has label from variable 547 (PV2SCIE)!

I hope you're finding out why this is happening.

And thanks to you, every time.

Cheers,
Gasper
Everything starts somewhere, although many physicists disagree. TP
gasper
 
Posts: 10
Joined: Tue Oct 13, 2020 8:27 am
Location: Slovenia

by jonathon » Tue Dec 22, 2020 3:46 am

thanks gasper, very helpful.

i'll take a look at these in the next couple of days (but don't be shy about chasing me up if it looks like i've forgotten).

cheers

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am

by gasper » Fri Jan 22, 2021 7:56 am

I just installed jamovi 1.6.12 and tried .sav file from the start of this thread (pisa_small_pia5.sav). I noticed that mixup includes also missing values. Somehow labels (and missing values) get mixed more often when missing values are not integers.
Maybe it's something with dot/comma as decimal separator or the fact that some missing values in SPSS have 2 and others 4 decimal places...

Anyway, here are the results (it took a while :tired_face: ):

1 CNT missing
2 SUBNATIO has label from 1 (CNT)
3 STRATUM has label from 2 (SUBNATIO)
4 OECD correct
5 NC has label from 3 (STRATUM)
6 SCHOOLID has label from 7 (StIDStd)
7 StIDStd has label from 379 (HOSTCUL)
8 ST01Q01 correct
9 ST02Q01 correct
10 ST03Q01 correct label but under missing values it's 97 twice, but 99 missing
58 ST26Q15 has label from 5 (NC)
59 ST26Q16 has label from 58 (ST26Q15)
60 ST26Q17 has label from 59 (ST26Q16)
347 AGE has label from 60 (ST26Q17)
348 GRADE correct
349 progn has label from 347 (AGE)
350 ANXMAT has label from 349 (progn)
351 ATSCHL has label from 350 (ANXMAT)
352 ATTLNACT has label from 351 (ATSCHL)
353 BELONG has label from 352 (ATTLNACT)
354 BFMJ2 has label from 353 (BELONG)
355 BMMJ1 has label from 442 (PV2SCIE)
356 CLSMAN has label from 354 (BFMJ2)
357 COBN_F has label from 356 (CLSMAN)
358 COBN_M has label from 357 (COBN_F)
359 COBN_S has label from 358 (COBN_M)
360 COGACT has label from 359 (COBN_S)
361 CULTDIST has label from 410 (PERSEV)
362 CULTPOS has label from 360 (COGACT)
363 DISCLIMA has label from 362 (CULTPOS)
364 ENTUSE has label from 355 (BMMJ1)
365 ESCS has label from 363 (DISCLIMA)
366 EXAPPLM has label from 365 (ESCS)
367 EXPUREM has label from 366 (EXAPPLM)
368 FAILMAT has label from 364 (ENTUSE)
369 FAMCON has label from 367 (EXPUREM)
370 FAMCONC has label from 369 (FAMCON)
371 FAMSTRUC correct
372 fisced correct
373 HEDRES has label from 370 (FAMCONC)
374 HERITCUL has label from 361 (CULTDIST)
375 hisced correct
376 hisei has label from 368 (FAILMAT)
377 HOMEPOS has label from 373 (HEDRES)
378 HOMSCH has label from 436 (ANCSUBNORM)
379 HOSTCUL has label from 374 (HERITCUL)
380 ICTATTNEG has label from 378 (HOMSCH)
381 ICTATTPOS has label from 380 (ICTATTNEG)
382 ICTHOME has label from 377 (HOMEPOS)
383 ICTRES has label from 382 (ICTHOME)
384 ICTSCH has label from 383 (ICTRES)
385 IMMIG correct
386 INFOCAR has label from 381 (ICTATTPOS)
387 INFOJOB1 has label from 386 (INFOCAR)
388 INFOJOB2 has label from 387 (INFOJOB1)
389 INSTMOT has label from 376 (hisei)
390 INTMAT has label from 389 (INSTMOT)
391 iscedd correct
392 iscedl correct
393 iscedo correct
394 LANGCOMM correct
395 LANGN has label from 384 (ICTSCH)
396 LANGRPPD correct
397 LMINS correct
398 MATBEH has label from 390 (INTMAT)
399 MATHEFF has label from 398 (MATBEH)
400 MATINTFC has label from 399 (MATHEFF)
401 MATWKETH has label from 400 (MATINTFC)
402 misced correct
403 MMINS correct
404 MTSUP has label from 395 (LANGN)
405 OCOD1 has label from 404 (MTSUP)
406 OCOD2 has label from 405 (OCOD1)
407 OPENPS has label from 388 (INFOJOB2)
408 OUTHOURS correct
409 PARED correct
410 PERSEV has label from 407 (OPENPS)
411 REPEAT correct
412 SCMAT has label from 406 (OCOD2)
413 SMINS correct
414 STUDREL has label from 412 (SCMAT)
415 SUBNORM has label from 401 (MATWKETH)
416 TCHBEHFA has label from 414 (STUDREL)
417 TCHBEHSO has label from 416 (TCHBEHFA)
418 TCHBEHTD has label from 417 (TCHBEHSO)
419 TEACHSUP has label from 418 (TCHBEHTD)
420 TestLANG has label from 419 (TEACHSUP)
421 TIMEINT correct
422 USEMATH has label from 415 (SUBNORM)
423 USESCH has label from 422 (USEMATH)
424 WEALTH has label from 420 (TestLANG)
425 ANCATSCHL has label from 424 (WEALTH)
426 ANCATTLNACT has label from 425 (ANCATSCHL)
427 ANCBELONG has label from 426 (ANCATTLNACT)
428 ANCCLSMAN has label from 427 (ANCBELONG)
429 ANCCOGACT has label from 428 (ANCCLSMAN)
430 ANCINSTMOT has label from 423 (USESCH)
431 ANCINTMAT has label from 430 (ANCINSTMOT)
432 ANCMATWKETH has label from 431 (ANCINTMAT)
433 ANCMTSUP has label from 429 (ANCCOGACT)
434 ANCSCMAT has label from 433 (ANCMTSUP)
435 ANCSTUDREL has label from 434 (ANCSCMAT)
436 ANCSUBNORM has label from 433 (ANCMATWKETH)
437 PV1MATH has label from 435 (ANCSTUDREL)
438 PV2MATH has label from 437 (PV1MATH)
439 PV1READ has label from 438 (PV2MATH)
440 PV2READ has label from 439 (PV1READ)
441 PV1SCIE has label from 440 (PV2READ)
442 PV2SCIE has label from 441 (PV1SCIE)

I hope we get to the bottom of this.

Gasper
Everything starts somewhere, although many physicists disagree. TP
gasper
 
Posts: 10
Joined: Tue Oct 13, 2020 8:27 am
Location: Slovenia

by jonathon » Sat Jan 23, 2021 9:11 am

yup, i haven't forgotten gasper ... will take a look soon.

cheers

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am


Return to Help