Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPSS scalar column with labels become nominal-text, which is not practical #1323

Closed
jbnezl opened this issue Jun 6, 2021 · 7 comments
Closed

Comments

@jbnezl
Copy link

jbnezl commented Jun 6, 2021

  • JASP version: 0.14
  • OS name and version: Win 10 Pro
  • Analysis: Import data
  • Bug description: Variables that are coded as scales in SPSS are coded as nominal in JASP
  • Expected behaviour: Variable represented as scales in SPSS should be represented as scales in JASP.

Steps to reproduce:

  1. Read the attached data file into JASP.
  2. Look at the attributes assigned to the variables.
    JASP-Example.zip

Thanks,
John

@JorisGoosen JorisGoosen self-assigned this Jun 7, 2021
@JorisGoosen
Copy link
Contributor

@jbnezl I see in the loaded data I see:
image

JASP expects all the data in a scalar column to be a float/scalar. However, while your data seems to contain only scalar, some of your entries have a label.

For JASP, to be able to show this label the data is usually be converted to ordinal (integers with labels).
But because you data also contains scalar floats it cannot do this and so it converts everything to text and thus nominal-text.

If you want the data to be imported correctly you would need to remove the labels from the column.

@jbnezl
Copy link
Author

jbnezl commented Jun 7, 2021

Dear Joris,

If I eliminate the value labels in the SPSS file, then JASP reads the data perfectly.
For large, multivariable data sets, which are becoming more common, this is far from convenient.
Might be useful to find a way to allow JASP to read files with value labelled variables that does not default to the value label when a cell entry corresponds to a value.
For example, in SPSS, I assigned a label to values of 2.5 for H_Agress (let's put aside misspelling of Aggress).
When JASP reads this data file, the entries for idnum 9 and 11 are the label.

Can't JASP simply ignore the value labels? Although I am not an advanced or experienced JASP user, I do not see how value labels are useful to JASP. Maybe make it as an option if it serves some purpose.

Regardless, thank you for taking the time to discuss this with me.
John

@JorisGoosen
Copy link
Contributor

Dear John,

If I eliminate the value labels in the SPSS file, then JASP reads the data perfectly.

Ah ok good, so at least in some cases there is a workaround for this. Another way would be simply removing the labels in JASP. By which I mean renaming the label for 2 from slightly agree (or whatever it is now) to 2. Once you've done this for all non-float labels you will be able to change the column to scale.

For large, multivariable data sets, which are becoming more common, this is far from convenient.
Might be useful to find a way to allow JASP to read files with value labelled variables that does not default to the value label when a cell entry corresponds to a value.

Well, usually people want to keep their labels, so dropping those would lead to quite some complaints. And they would be right because JASP would be throwing away information that the sav-file contains.

For example, in SPSS, I assigned a label to values of 2.5 for H_Agress (let's put aside misspelling of Aggress).
When JASP reads this data file, the entries for idnum 9 and 11 are the label.

Perfectly reasonable behaviour given your data-file and the way you defined your labels.

Can't JASP simply ignore the value labels? Although I am not an advanced or experienced JASP user, I do not see how value labels are useful to JASP. Maybe make it as an option if it serves some purpose.

I think what we could do is make it so that when you try to convert it to scalar it could check whether all the values are convertible to float and if so offer to drop all the labels.

Regardless, thank you for taking the time to discuss this with me.
John

You are welcome!

I will change the title to reflect the problem in some more detail and I will set this issue for the 0.15.1 release because we are currently working hard on getting 0.15 out the door. Hopefully 0.15.1 will follow not too long after that.

Cheers!

@JorisGoosen JorisGoosen changed the title Difficulty reading in SPSS files SPSS scalar column with labels become nominal-text, which is not practical Jun 7, 2021
@jbnezl
Copy link
Author

jbnezl commented Jun 7, 2021

Hi Joris,

I recommend JASP all the time to people, and this exchange is a good example of why I do this.
Perhaps an option could be added to the data preferences window.

By the way, where/how does JASP store value labels? The only time I have ever seen them is in this dataset.

Regardless, thanks again for your attention to this issue.
I genuinely appreciate it.

Cheers,
John

@JorisGoosen
Copy link
Contributor

I recommend JASP all the time to people, and this exchange is a good example of why I do this.
Perhaps an option could be added to the data preferences window.

That might also be a good solution.

By the way, where/how does JASP store value labels? The only time I have ever seen them is in this dataset.

If you click on the column's name in the data view the variable editor will be opened (for everything except scalar anyway) and there you can edit the labels if so wished.

Regardless, thanks again for your attention to this issue.
I genuinely appreciate it.

Thank you for letting me and us know and you are very welcome!

@tomtomme
Copy link
Member

tomtomme commented Jan 23, 2024

Tested with current 0.19 beta & till valid.
We hould import all information stored in .sav files, so also the scale that was set. I understand that this is difficult for JASP here in combination with float and labels. So maybe to solve this we would need to allow labels also for float / scale data.

related issues
#2500
#1633
#1581
#1190
#606

@JorisGoosen
Copy link
Contributor

Fixed in jasp-stats/jasp-desktop#5367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants