Losing labels in import from Stata

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 tkemeny » Mon Sep 07, 2020 3:19 pm

Hello,

I would like to import a dataset from Stata in which many variables are numerical but represent categorical variables, and with labels attached to give them meaning (see the screenshot example). When I open the data into Jamovi, all the labels are stripped away.

Is there a way to bring the labels in as well somehow?

Thanks,
Tom
Attachments
Screen Shot 2020-09-07 at 16.16.10.png
Stata screenshot of an example variable
Screen Shot 2020-09-07 at 16.16.10.png (50.23 KiB) Viewed 190 times
tkemeny
 
Posts: 3
Joined: Mon Sep 07, 2020 2:57 pm

by jonathon » Tue Sep 08, 2020 7:50 am

hi,

can you either attach here the stata file, or send it to contact <at> jamovi.org?

the importing spss file pathway has been thoroughly tested, but stata is less common, and so i won't be surprised if there's the odd issue there. if you can provide me with a file, i can try and figure out what's going on.

with thanks

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

by tkemeny » Tue Sep 08, 2020 8:05 am

Many thanks Jonathon,

I will send a file by email - when I tried to attach the file, the forum gave me an error ("The extension dta is not allowed. The upload was rejected because the uploaded file was identified as a possible attack vector.").

Best,
Tom
tkemeny
 
Posts: 3
Joined: Mon Sep 07, 2020 2:57 pm

by jonathon » Tue Sep 08, 2020 9:14 am

yup, you could probably zip it up and attach, but email works too.

cheers

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

by tkemeny » Thu Sep 10, 2020 9:58 am

Ok - see attached - thanks.
Attachments
USociety_1pct.dta.zip
(75.49 KiB) Downloaded 5 times
tkemeny
 
Posts: 3
Joined: Mon Sep 07, 2020 2:57 pm

by jonathon » Thu Sep 10, 2020 10:36 am

ah, so it looks like stata files have the level labels encoded *after* the data in the file ... spss files have them before, and our importer assumes that they come before ... i'll have to think of a way to handle both scenarios.

thanks for sharing this file with us

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


Return to Help