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 684 times
tkemeny
 
Posts: 9
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: 1474
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: 9
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: 1474
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 28 times
tkemeny
 
Posts: 9
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: 1474
Joined: Fri Jan 27, 2017 10:04 am

by jonathon » Mon Oct 05, 2020 6:00 am

hi,

thanks for reporting this, and for providing that file. i've made changes to our import procedure, and this will handle labels in stata files. i've taken a conservative approach, so there may still be situations where it doesn't import as expected, but i guess we'll see.

with thanks

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

by tkemeny » Thu Oct 22, 2020 9:12 am

Hi Jonathon,

Just following up on this - for this to work, which version should I have? I'm running Version 1.2.27.0 right now.

Many thanks
Tom
tkemeny
 
Posts: 9
Joined: Mon Sep 07, 2020 2:57 pm

by jonathon » Thu Oct 22, 2020 10:17 am

hey, you'll need the 1.6.4 ... which i don't think we've released yet. we should push it out in the next couple of days. i think the cloud version is running 1.6.4, so you could try it there:

https://cloud.jamovi.org

cheers

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

by tkemeny » Thu Oct 22, 2020 11:51 am

Many thanks for the quick response. I tried the cloud version and it worked perfectly!

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

Next

Return to Help