Page 1 of 2
Losing labels in import from Stata
Posted: Mon Sep 07, 2020 3:19 pm
by tkemeny
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
Re: Losing labels in import from Stata
Posted: Tue Sep 08, 2020 7:50 am
by jonathon
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
Re: Losing labels in import from Stata
Posted: Tue Sep 08, 2020 8:05 am
by tkemeny
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
Re: Losing labels in import from Stata
Posted: Tue Sep 08, 2020 9:14 am
by jonathon
yup, you could probably zip it up and attach, but email works too.
cheers
jonathon
Re: Losing labels in import from Stata
Posted: Thu Sep 10, 2020 9:58 am
by tkemeny
Ok - see attached - thanks.
Re: Losing labels in import from Stata
Posted: Thu Sep 10, 2020 10:36 am
by jonathon
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
Re: Losing labels in import from Stata
Posted: Mon Oct 05, 2020 6:00 am
by jonathon
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
Re: Losing labels in import from Stata
Posted: Thu Oct 22, 2020 9:12 am
by tkemeny
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
Re: Losing labels in import from Stata
Posted: Thu Oct 22, 2020 10:17 am
by jonathon
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
Re: Losing labels in import from Stata
Posted: Thu Oct 22, 2020 11:51 am
by tkemeny
Many thanks for the quick response. I tried the cloud version and it worked perfectly!
Best,
Tom