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

Feature Request (or Question): Support for Multiple Response Sets in SAV Files? #229

Open
insightindustry opened this issue Jan 8, 2021 · 5 comments

Comments

@insightindustry
Copy link

First off, thanks for an awesome library! It is much appreciated, and this library (and the related bindings) are incredibly useful. Thanks for all the hard work!

I do, however, have one question (that also came up in Roche/pyreadstat#25) which seems to be a feature request. Near as I can tell, it seems that ReadStat's SAV functionality does not currently support Multiple Response Sets. Is that correct?

If so, then it would be very helpful if it could be extended with this support. In the Pyreadstat issue mentioned above, SamMousa included some helpful example files, one with multiple category sets and one with multiple dichotomy sets, and a link to some more docs.

If my reading of the ReadStat code is correct, then I think that MR set support would be a great addition and valuable for the analysis of "check all that apply"-style survey questions. Given that MR sets are largely "collections" of other variables/columns in the dataset, I suspect (without having gone too deep into the code) the support can be facilitated by extending the extract_metadata program and the corresponding metadata JSON schema...but this is purely speculation on my part at this stage.

@TheTallBlonde1
Copy link

TheTallBlonde1 commented Aug 26, 2022

InsightIndustry has a really good point here. It would be great to get the multiple response sets from an SPSS file. This is a major issue now because savReaderWriter no longer works in python 3.10 (without editing it) - this used to be the only place this data could be obtained.

This is some more detail that would help you out:

Multiple Response Sets relate data that will need to be analyzed across multiple SPSS data columns
Each column has 2 answers {1 : 'Yes', 2 : 'No'} (Yes = Answered / No = Not Answered) - sometimes it can have more than 1 exclusive 'Yes' answer.

The metadata should provide a dictionary with the data
key = name of the Multiple Response Set
value = dictionary of dictionaries containing columns and the relevant 'Yes' answers

e.g. (based on 4 columns making up each multiple response set)
multiple_response_sets = {'Multi Set 1' : { 'ColA' : { 1 : 'Yes'} , 'ColB' : { 1 : 'Yes'}, 'ColC' : { 1 : 'Yes'}, 'ColD' : { 1 : 'Yes'}}, 'Multi Set 2' : { 'ColS' : { 1 : 'Yes'} , 'ColT' : { 1 : 'Yes'}, 'ColU' : { 1 : 'Yes'}, 'ColV' : { 1 : 'Yes', 99 : 'Not Sure'}}}

@joaquimadraz
Copy link

@evanmiller My team is interested in opening a PR to support reading multiple response sets. Just checking in if you available to support us before we commit to it. Thank you!

@arsoni20
Copy link

We need this too, if this can be built out that'd be awesome.

@joaquimadraz
Copy link

joaquimadraz commented Apr 24, 2024

FYI @slobodan-ilic is adding support for reading multiple response sets Roche/pyreadstat#259

@slobodan-ilic
Copy link

I've added a PR for this repo as well. The plan is to rebase the pyreadstat once we iron the #313 out. Any suggestions and corrections from @evanmiller more than welcome. I'm fully available for iterating over this.

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

6 participants